@wirecat/cli-memo 0.131.63 → 0.131.65
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/memo.js +2 -2
- package/dist/bundle/{app-server-QBJG7OGQ.js → app-server-7KM4MSDA.js} +9 -9
- package/dist/bundle/{auto-LGA3VXKQ.js → auto-4KOZDLIU.js} +16 -16
- package/dist/bundle/{chunk-LK6D26RK.js → chunk-3SCHFNUH.js} +5 -5
- package/dist/bundle/{chunk-HGNWJJDT.js → chunk-3YNJBKGV.js} +13 -1
- package/dist/bundle/{chunk-Q3VEUHC7.js → chunk-6OS7PTOC.js} +3 -3
- package/dist/bundle/{chunk-BOMHJR2E.js → chunk-BEMVAPYA.js} +3 -3
- package/dist/bundle/{chunk-K4WCDPDL.js → chunk-C4DJLVJQ.js} +4 -4
- package/dist/bundle/{chunk-2UCLF4AO.js → chunk-DXTNBVLV.js} +394 -115
- package/dist/bundle/{chunk-GNHDE7FH.js → chunk-FHZKHKBJ.js} +9 -9
- package/dist/bundle/{chunk-TBSWOVM3.js → chunk-FKUA3BTM.js} +14 -14
- package/dist/bundle/{chunk-RSG7BRXI.js → chunk-FUIUS3IG.js} +25 -1
- package/dist/bundle/{chunk-TSKGEK2S.js → chunk-LVLFLWGY.js} +3 -3
- package/dist/bundle/{chunk-O2NQCWRM.js → chunk-ML46T7UC.js} +8 -8
- package/dist/bundle/{chunk-WDZOEBTE.js → chunk-NH3A5QTW.js} +2 -2
- package/dist/bundle/{chunk-6OZ2WI7Y.js → chunk-NIJZXGJN.js} +1 -1
- package/dist/bundle/{chunk-EGI6JHIA.js → chunk-NRHF7TQ4.js} +2 -2
- package/dist/bundle/{chunk-WDWKG7FJ.js → chunk-PVGK67AJ.js} +17 -0
- package/dist/bundle/{chunk-E5JQFEIQ.js → chunk-QHNAPLVB.js} +4 -4
- package/dist/bundle/{chunk-SJ55SMBE.js → chunk-QTF4ZXOL.js} +2 -1
- package/dist/bundle/{chunk-5Q534L4I.js → chunk-SIOUPPN7.js} +5 -4
- package/dist/bundle/{chunk-OXBETHGN.js → chunk-UXAP7MNL.js} +4 -4
- package/dist/bundle/{chunk-3ZXWLFUG.js → chunk-VLUDHCCX.js} +3 -3
- package/dist/bundle/{chunk-4BKSE3CG.js → chunk-X5CRFU4E.js} +4 -4
- package/dist/bundle/{chunk-YVJAD5E7.js → chunk-YLG2M2TF.js} +38 -5
- package/dist/bundle/{command-contract-SIXWLKAS.js → command-contract-PLB2JGFJ.js} +2 -2
- package/dist/bundle/{entry-SFLEGFSN.js → entry-MUE6HWX3.js} +1 -1
- package/dist/bundle/{failure-OGSLUNT6.js → failure-CRWMZZBO.js} +14 -14
- package/dist/bundle/{first-run-ZKDGFY6P.js → first-run-3JYWLJCH.js} +1 -1
- package/dist/bundle/{first-screen-IQEU7XF2.js → first-screen-QH34AIFV.js} +3 -3
- package/dist/bundle/{mcp-Y4XMDC5Q.js → mcp-QX2D6EXA.js} +6 -6
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{program-ZHLCEVWB.js → program-RM2L3LIT.js} +1798 -434
- package/dist/bundle/{server-IQILK5YP.js → server-L622PMVC.js} +9 -9
- package/dist/bundle/{server-NKI7SVK5.js → server-SJVP2XXD.js} +6 -6
- package/dist/bundle/{server-I5BPRS5C.js → server-XKSIHWM2.js} +19 -19
- package/dist/bundle/{store-6H4FPFTX.js → store-M5QSIRWJ.js} +1 -1
- package/dist/bundle/{store-maintenance-command-IFVWSQMJ.js → store-maintenance-command-PQCO5ICC.js} +5 -5
- package/dist/bundle/{update-YMILPFRY.js → update-PQUASMQN.js} +15 -15
- package/dist/digest/command.d.ts.map +1 -1
- package/dist/digest/command.js +4 -3
- package/dist/digest/command.js.map +1 -1
- package/dist/digest/digest.d.ts.map +1 -1
- package/dist/digest/digest.js +2 -0
- package/dist/digest/digest.js.map +1 -1
- package/dist/digest/sync-health.d.ts +6 -3
- package/dist/digest/sync-health.d.ts.map +1 -1
- package/dist/digest/sync-health.js +46 -20
- package/dist/digest/sync-health.js.map +1 -1
- package/dist/digest/tasks.d.ts +2 -0
- package/dist/digest/tasks.d.ts.map +1 -1
- package/dist/digest/tasks.js +3 -1
- package/dist/digest/tasks.js.map +1 -1
- package/dist/discovery/command.d.ts.map +1 -1
- package/dist/discovery/command.js +6 -0
- package/dist/discovery/command.js.map +1 -1
- package/dist/events/command.d.ts +4 -0
- package/dist/events/command.d.ts.map +1 -0
- package/dist/events/command.js +35 -0
- package/dist/events/command.js.map +1 -0
- package/dist/events/events.d.ts +52 -0
- package/dist/events/events.d.ts.map +1 -0
- package/dist/events/events.js +199 -0
- package/dist/events/events.js.map +1 -0
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +90 -3
- package/dist/examples.js.map +1 -1
- package/dist/finance/command.d.ts +1 -1
- package/dist/finance/command.d.ts.map +1 -1
- package/dist/finance/command.js +13 -30
- package/dist/finance/command.js.map +1 -1
- package/dist/finance/contracts-command.d.ts +12 -0
- package/dist/finance/contracts-command.d.ts.map +1 -0
- package/dist/finance/contracts-command.js +110 -0
- package/dist/finance/contracts-command.js.map +1 -0
- package/dist/finance/deals-command.d.ts.map +1 -1
- package/dist/finance/deals-command.js +5 -4
- package/dist/finance/deals-command.js.map +1 -1
- package/dist/finance/lines-command.d.ts +37 -0
- package/dist/finance/lines-command.d.ts.map +1 -0
- package/dist/finance/lines-command.js +70 -0
- package/dist/finance/lines-command.js.map +1 -0
- package/dist/finance/orders-command.d.ts.map +1 -1
- package/dist/finance/orders-command.js +5 -2
- package/dist/finance/orders-command.js.map +1 -1
- package/dist/finance/products-command.d.ts +12 -0
- package/dist/finance/products-command.d.ts.map +1 -0
- package/dist/finance/products-command.js +99 -0
- package/dist/finance/products-command.js.map +1 -0
- package/dist/finance/subscriptions-command.d.ts +12 -0
- package/dist/finance/subscriptions-command.d.ts.map +1 -0
- package/dist/finance/subscriptions-command.js +153 -0
- package/dist/finance/subscriptions-command.js.map +1 -0
- package/dist/finance/transactions-command.d.ts +12 -0
- package/dist/finance/transactions-command.d.ts.map +1 -0
- package/dist/finance/transactions-command.js +137 -0
- package/dist/finance/transactions-command.js.map +1 -0
- package/dist/finance/wallets-command.d.ts +12 -0
- package/dist/finance/wallets-command.d.ts.map +1 -0
- package/dist/finance/wallets-command.js +106 -0
- package/dist/finance/wallets-command.js.map +1 -0
- package/dist/finance/written.d.ts +37 -0
- package/dist/finance/written.d.ts.map +1 -0
- package/dist/finance/written.js +36 -0
- package/dist/finance/written.js.map +1 -0
- package/dist/knowledge/command.d.ts.map +1 -1
- package/dist/knowledge/command.js +3 -2
- package/dist/knowledge/command.js.map +1 -1
- package/dist/mcp/permissions.d.ts +1 -1
- package/dist/mcp/permissions.d.ts.map +1 -1
- package/dist/mcp/permissions.js +1 -0
- package/dist/mcp/permissions.js.map +1 -1
- package/dist/options.d.ts +2 -0
- package/dist/options.d.ts.map +1 -1
- package/dist/options.js +2 -0
- package/dist/options.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +174 -0
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +24 -0
- package/dist/reasons.js.map +1 -1
- package/dist/records/import.d.ts +2 -4
- package/dist/records/import.d.ts.map +1 -1
- package/dist/records/import.js +41 -41
- package/dist/records/import.js.map +1 -1
- package/dist/records/input.d.ts +20 -0
- package/dist/records/input.d.ts.map +1 -0
- package/dist/records/input.js +115 -0
- package/dist/records/input.js.map +1 -0
- package/dist/records/mapping.d.ts +16 -1
- package/dist/records/mapping.d.ts.map +1 -1
- package/dist/records/mapping.js +24 -11
- package/dist/records/mapping.js.map +1 -1
- package/dist/records/record-commands.d.ts +8 -0
- package/dist/records/record-commands.d.ts.map +1 -0
- package/dist/records/record-commands.js +89 -0
- package/dist/records/record-commands.js.map +1 -0
- package/dist/records/sources.d.ts +48 -0
- package/dist/records/sources.d.ts.map +1 -0
- package/dist/records/sources.js +72 -0
- package/dist/records/sources.js.map +1 -0
- package/dist/review/kinds.d.ts +1 -1
- package/dist/review/kinds.d.ts.map +1 -1
- package/dist/review/kinds.js +4 -0
- package/dist/review/kinds.js.map +1 -1
- package/dist/review/review.d.ts.map +1 -1
- package/dist/review/review.js +4 -0
- package/dist/review/review.js.map +1 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +34 -0
- package/dist/rows.js.map +1 -1
- package/dist/search/lane-gates.js +1 -1
- package/dist/search/lane-gates.js.map +1 -1
- package/dist/show/command.d.ts +3 -0
- package/dist/show/command.d.ts.map +1 -1
- package/dist/show/command.js +21 -1
- package/dist/show/command.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/cli-memo/SKILL.md +8 -5
- package/skills/cli-memo/topics/money.md +20 -1
- package/skills/cli-memo/topics/proposals.md +8 -5
- package/skills/cli-memo/topics/search.md +7 -0
- package/skills/morning-digest/SKILL.md +2 -1
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
vectorModelKey,
|
|
55
55
|
withAttempt,
|
|
56
56
|
writeTextModelsSection
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-PVGK67AJ.js";
|
|
58
58
|
import {
|
|
59
59
|
isNewer,
|
|
60
60
|
updateCommand
|
|
@@ -125,6 +125,7 @@ import {
|
|
|
125
125
|
googleDocumentLinks,
|
|
126
126
|
hasStems,
|
|
127
127
|
hasText,
|
|
128
|
+
headerErrors,
|
|
128
129
|
historyStartKey,
|
|
129
130
|
hitFiles,
|
|
130
131
|
holdsKind,
|
|
@@ -139,6 +140,7 @@ import {
|
|
|
139
140
|
isOwnerOnlyKind,
|
|
140
141
|
isQueryLimit,
|
|
141
142
|
isStemmed,
|
|
143
|
+
jsonLine,
|
|
142
144
|
kindIn,
|
|
143
145
|
listedHolds,
|
|
144
146
|
looksLikeReference,
|
|
@@ -170,11 +172,12 @@ import {
|
|
|
170
172
|
searchError,
|
|
171
173
|
sourceOf,
|
|
172
174
|
threadConversation,
|
|
175
|
+
typedPhone,
|
|
173
176
|
validateAst,
|
|
174
177
|
validateFields,
|
|
175
178
|
waitingPointer,
|
|
176
179
|
withoutField
|
|
177
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-3YNJBKGV.js";
|
|
178
181
|
import {
|
|
179
182
|
EVENT_QUERY,
|
|
180
183
|
MEETING_FIELD_NAMES,
|
|
@@ -20123,70 +20126,6 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
20123
20126
|
};
|
|
20124
20127
|
}, "createContextEvidenceReader");
|
|
20125
20128
|
|
|
20126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/vcard.js
|
|
20127
|
-
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
20128
|
-
var encoder = new TextEncoder();
|
|
20129
|
-
|
|
20130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
20131
|
-
var emptyReceipt = /* @__PURE__ */ __name((dryRun, errors) => ({
|
|
20132
|
-
dryRun,
|
|
20133
|
-
source: null,
|
|
20134
|
-
created: 0,
|
|
20135
|
-
updated: 0,
|
|
20136
|
-
unchanged: 0,
|
|
20137
|
-
deleted: 0,
|
|
20138
|
-
refused: 0,
|
|
20139
|
-
proposed: [],
|
|
20140
|
-
waiting: [],
|
|
20141
|
-
flagged: [],
|
|
20142
|
-
unmatched: [],
|
|
20143
|
-
ignored: [],
|
|
20144
|
-
errors,
|
|
20145
|
-
truncated: false
|
|
20146
|
-
}), "emptyReceipt");
|
|
20147
|
-
var receiptOf = /* @__PURE__ */ __name((dryRun, source, run) => ({
|
|
20148
|
-
dryRun,
|
|
20149
|
-
source: { provider: source.provider, account: source.account, batchId: source.batch_id },
|
|
20150
|
-
created: run.created,
|
|
20151
|
-
updated: run.updated,
|
|
20152
|
-
unchanged: run.unchanged,
|
|
20153
|
-
deleted: run.deleted,
|
|
20154
|
-
refused: run.refused,
|
|
20155
|
-
proposed: run.proposed,
|
|
20156
|
-
waiting: run.waiting.map(({ index, key, missing: missing4 }) => ({ key, pointer: waitingPointer(index, missing4), missing: missing4 })),
|
|
20157
|
-
flagged: run.flagged.map(({ index, ...flag }) => ({ ...flag, pointer: pointerOf("records", index) })),
|
|
20158
|
-
unmatched: run.unmatched.map(({ index, key, reason, candidates }) => ({
|
|
20159
|
-
key,
|
|
20160
|
-
pointer: pointerOf("records", index, "fields"),
|
|
20161
|
-
reason,
|
|
20162
|
-
candidates
|
|
20163
|
-
})),
|
|
20164
|
-
ignored: run.ignored.map(({ index, key, at, reason }) => ({
|
|
20165
|
-
key,
|
|
20166
|
-
pointer: pointerOf("records", index, ...at),
|
|
20167
|
-
reason
|
|
20168
|
-
})),
|
|
20169
|
-
errors: run.errors,
|
|
20170
|
-
truncated: run.truncated
|
|
20171
|
-
}), "receiptOf");
|
|
20172
|
-
var itemOf2 = /* @__PURE__ */ __name((record2, index) => {
|
|
20173
|
-
const errors = recordErrors(record2, index);
|
|
20174
|
-
return { index, record: record2, ...errors.length > 0 ? { errors } : {} };
|
|
20175
|
-
}, "itemOf");
|
|
20176
|
-
var refusedAll = /* @__PURE__ */ __name((dryRun, errors, onIssue) => {
|
|
20177
|
-
for (const error of errors)
|
|
20178
|
-
onIssue?.(error);
|
|
20179
|
-
return emptyReceipt(dryRun, errors);
|
|
20180
|
-
}, "refusedAll");
|
|
20181
|
-
var ingest = /* @__PURE__ */ __name(async (store, envelope, { account, dryRun = false, chunk = 1e3, onIssue }) => {
|
|
20182
|
-
const broken2 = envelopeErrors(envelope, account);
|
|
20183
|
-
if (broken2.length > 0)
|
|
20184
|
-
return refusedAll(dryRun, broken2, onIssue);
|
|
20185
|
-
const { source, records, options: options2 } = envelope;
|
|
20186
|
-
const items = records.map(itemOf2);
|
|
20187
|
-
return receiptOf(dryRun, source, await store.records.run(source, items, { dryRun, chunk, options: options2, onIssue }));
|
|
20188
|
-
}, "ingest");
|
|
20189
|
-
|
|
20190
20129
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
20191
20130
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
20192
20131
|
var DEFAULT_PURPOSES = ["work"];
|
|
@@ -24247,6 +24186,342 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options2 = {})
|
|
|
24247
24186
|
}, "excerpt");
|
|
24248
24187
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
24249
24188
|
|
|
24189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
24190
|
+
import { createInterface } from "node:readline";
|
|
24191
|
+
|
|
24192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/domain/vcard.js
|
|
24193
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
24194
|
+
var MAX_ID = 512;
|
|
24195
|
+
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
24196
|
+
var isVcard = /* @__PURE__ */ __name((text2) => /^?\s*BEGIN:VCARD\b/i.test(text2), "isVcard");
|
|
24197
|
+
var isQuotedPrintable = /* @__PURE__ */ __name((line3) => {
|
|
24198
|
+
const colon = line3.indexOf(":");
|
|
24199
|
+
return /;(ENCODING=)?QUOTED-PRINTABLE\b/i.test(colon < 0 ? line3 : line3.slice(0, colon));
|
|
24200
|
+
}, "isQuotedPrintable");
|
|
24201
|
+
var PROPERTY_START = /^([A-Za-z0-9-]+\.)?[A-Za-z][A-Za-z0-9-]*(;[^:]*)?:/;
|
|
24202
|
+
var isSoft = /* @__PURE__ */ __name((line3) => line3 !== void 0 && isQuotedPrintable(line3) && line3.endsWith("="), "isSoft");
|
|
24203
|
+
var unfolded = /* @__PURE__ */ __name((text2) => {
|
|
24204
|
+
const lines3 = [];
|
|
24205
|
+
for (const raw of text2.replace(/^\uFEFF/, "").split(/\r\n|\r|\n/)) {
|
|
24206
|
+
const last2 = lines3.length - 1;
|
|
24207
|
+
const previous = lines3[last2];
|
|
24208
|
+
const bounds = /^(BEGIN|END):/i.test(raw);
|
|
24209
|
+
if (isSoft(previous) && !bounds && !PROPERTY_START.test(raw))
|
|
24210
|
+
lines3[last2] = previous.slice(0, -1) + raw.replace(/^[ \t]/, "");
|
|
24211
|
+
else if (previous !== void 0 && /^[ \t]/.test(raw) && !bounds)
|
|
24212
|
+
lines3[last2] = previous + raw.slice(1);
|
|
24213
|
+
else {
|
|
24214
|
+
if (isSoft(previous))
|
|
24215
|
+
lines3[last2] = previous.slice(0, -1);
|
|
24216
|
+
lines3.push(raw);
|
|
24217
|
+
}
|
|
24218
|
+
}
|
|
24219
|
+
const last = lines3.length - 1;
|
|
24220
|
+
if (isSoft(lines3[last]))
|
|
24221
|
+
lines3[last] = lines3[last].slice(0, -1);
|
|
24222
|
+
return lines3.filter((line3) => line3.trim() !== "");
|
|
24223
|
+
}, "unfolded");
|
|
24224
|
+
var propertyOf = /* @__PURE__ */ __name((line3) => {
|
|
24225
|
+
let quoted = false;
|
|
24226
|
+
let colon = -1;
|
|
24227
|
+
for (let index = 0; index < line3.length; index += 1) {
|
|
24228
|
+
if (line3[index] === '"')
|
|
24229
|
+
quoted = !quoted;
|
|
24230
|
+
else if (line3[index] === ":" && !quoted) {
|
|
24231
|
+
colon = index;
|
|
24232
|
+
break;
|
|
24233
|
+
}
|
|
24234
|
+
}
|
|
24235
|
+
if (colon < 0)
|
|
24236
|
+
return void 0;
|
|
24237
|
+
const [head = "", ...rest] = line3.slice(0, colon).split(";");
|
|
24238
|
+
const params = /* @__PURE__ */ new Map();
|
|
24239
|
+
for (const part of rest) {
|
|
24240
|
+
const equals = part.indexOf("=");
|
|
24241
|
+
const key = equals < 0 ? /^(QUOTED-PRINTABLE|BASE64|8BIT|7BIT|B)$/i.test(part) ? "ENCODING" : "TYPE" : part.slice(0, equals);
|
|
24242
|
+
const values = (equals < 0 ? part : part.slice(equals + 1)).replaceAll('"', "").split(",");
|
|
24243
|
+
params.set(key.toUpperCase(), [...params.get(key.toUpperCase()) ?? [], ...values.map((one2) => one2.toUpperCase())]);
|
|
24244
|
+
}
|
|
24245
|
+
const name = head.replace(/^[^.]*\./, "").toUpperCase();
|
|
24246
|
+
return { name, params, value: line3.slice(colon + 1) };
|
|
24247
|
+
}, "propertyOf");
|
|
24248
|
+
var encoder = new TextEncoder();
|
|
24249
|
+
var decoded = /* @__PURE__ */ __name((property, report) => {
|
|
24250
|
+
const encoding = property.params.get("ENCODING")?.[0];
|
|
24251
|
+
if (encoding !== "QUOTED-PRINTABLE")
|
|
24252
|
+
return property.value;
|
|
24253
|
+
const bytes2 = [];
|
|
24254
|
+
const { value } = property;
|
|
24255
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
24256
|
+
const hex = value.slice(index + 1, index + 3);
|
|
24257
|
+
if (value[index] === "=" && /^[0-9A-F]{2}$/i.test(hex)) {
|
|
24258
|
+
bytes2.push(Number.parseInt(hex, 16));
|
|
24259
|
+
index += 2;
|
|
24260
|
+
} else
|
|
24261
|
+
for (const byte of encoder.encode(value[index]))
|
|
24262
|
+
bytes2.push(byte);
|
|
24263
|
+
}
|
|
24264
|
+
const charset = property.params.get("CHARSET")?.[0]?.toLowerCase() ?? "utf-8";
|
|
24265
|
+
try {
|
|
24266
|
+
return new TextDecoder(charset).decode(new Uint8Array(bytes2));
|
|
24267
|
+
} catch {
|
|
24268
|
+
report(`${property.name} names the unknown charset ${charset}: read as UTF-8`);
|
|
24269
|
+
return new TextDecoder("utf-8").decode(new Uint8Array(bytes2));
|
|
24270
|
+
}
|
|
24271
|
+
}, "decoded");
|
|
24272
|
+
var components = /* @__PURE__ */ __name((value) => {
|
|
24273
|
+
const parts = [""];
|
|
24274
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
24275
|
+
const char = value[index];
|
|
24276
|
+
if (char === "\\" && index + 1 < value.length) {
|
|
24277
|
+
const next = value[index + 1];
|
|
24278
|
+
parts[parts.length - 1] += next === "n" || next === "N" ? "\n" : next;
|
|
24279
|
+
index += 1;
|
|
24280
|
+
} else if (char === ";")
|
|
24281
|
+
parts.push("");
|
|
24282
|
+
else
|
|
24283
|
+
parts[parts.length - 1] += char;
|
|
24284
|
+
}
|
|
24285
|
+
return parts.map((part) => part.trim());
|
|
24286
|
+
}, "components");
|
|
24287
|
+
var textOf = /* @__PURE__ */ __name((property, report) => components(decoded(property, report)).join(";").trim(), "textOf");
|
|
24288
|
+
var e164 = /* @__PURE__ */ __name((typed, region) => {
|
|
24289
|
+
const text2 = typed.replace(/^tel:/i, "").replace(/;.*$/, "").trim();
|
|
24290
|
+
const international = /^(\+|00)/.test(text2);
|
|
24291
|
+
if (!international && region === void 0)
|
|
24292
|
+
return void 0;
|
|
24293
|
+
const value = typedPhone(text2, region === void 0 ? {} : { phoneCountries: [region] })?.value;
|
|
24294
|
+
return value?.startsWith("+") ? value : void 0;
|
|
24295
|
+
}, "e164");
|
|
24296
|
+
var foldedName = /* @__PURE__ */ __name((name) => name.normalize("NFKC").toLowerCase().replace(/\s+/g, " ").trim(), "foldedName");
|
|
24297
|
+
var hashed = /* @__PURE__ */ __name((prefix, parts) => `${prefix}${createHash2("sha256").update(parts.join("\n")).digest("hex").slice(0, 32)}`, "hashed");
|
|
24298
|
+
var organizationId = /* @__PURE__ */ __name((name) => {
|
|
24299
|
+
const id2 = `org:${foldedName(name)}`;
|
|
24300
|
+
return id2.length <= MAX_ID ? id2 : hashed("org:", [foldedName(name)]);
|
|
24301
|
+
}, "organizationId");
|
|
24302
|
+
var titleWord = /* @__PURE__ */ __name((title) => {
|
|
24303
|
+
const word = title.toLowerCase().trim().replace(/\s+/g, "-");
|
|
24304
|
+
return AS_WORD.test(word) ? word : void 0;
|
|
24305
|
+
}, "titleWord");
|
|
24306
|
+
var nameOf2 = /* @__PURE__ */ __name((properties, report) => {
|
|
24307
|
+
const full = properties.find(({ name }) => name === "FN");
|
|
24308
|
+
const text2 = full ? textOf(full, report) : "";
|
|
24309
|
+
if (text2)
|
|
24310
|
+
return text2;
|
|
24311
|
+
const structured = properties.find(({ name }) => name === "N");
|
|
24312
|
+
if (!structured)
|
|
24313
|
+
return void 0;
|
|
24314
|
+
const [family = "", given = "", additional = ""] = components(decoded(structured, report));
|
|
24315
|
+
return [given, additional, family].filter(Boolean).join(" ") || void 0;
|
|
24316
|
+
}, "nameOf");
|
|
24317
|
+
var SKIPPED = /* @__PURE__ */ new Set(["PHOTO", "LOGO", "SOUND", "KEY"]);
|
|
24318
|
+
var cardsOf = /* @__PURE__ */ __name((text2) => {
|
|
24319
|
+
const cards = [];
|
|
24320
|
+
const issues = [];
|
|
24321
|
+
let card;
|
|
24322
|
+
const isBound = /* @__PURE__ */ __name((property, name) => property.name === name && property.value.trim().toUpperCase() === "VCARD", "isBound");
|
|
24323
|
+
for (const line3 of unfolded(text2)) {
|
|
24324
|
+
const property = propertyOf(line3);
|
|
24325
|
+
if (!property)
|
|
24326
|
+
continue;
|
|
24327
|
+
if (isBound(property, "BEGIN")) {
|
|
24328
|
+
if (card) {
|
|
24329
|
+
issues.push({ card: cards.length, message: "BEGIN:VCARD inside a card: the card ends there, unfinished" });
|
|
24330
|
+
cards.push(card);
|
|
24331
|
+
}
|
|
24332
|
+
card = [];
|
|
24333
|
+
} else if (isBound(property, "END")) {
|
|
24334
|
+
if (card)
|
|
24335
|
+
cards.push(card);
|
|
24336
|
+
card = void 0;
|
|
24337
|
+
} else if (card && !SKIPPED.has(property.name))
|
|
24338
|
+
card.push(property);
|
|
24339
|
+
}
|
|
24340
|
+
if (card) {
|
|
24341
|
+
issues.push({ card: cards.length, message: "the file ends inside a card, with no END:VCARD" });
|
|
24342
|
+
cards.push(card);
|
|
24343
|
+
}
|
|
24344
|
+
return { cards, issues };
|
|
24345
|
+
}, "cardsOf");
|
|
24346
|
+
var envelopeOfVcard = /* @__PURE__ */ __name((text2, { provider, account, batchId, region }) => {
|
|
24347
|
+
const { cards, issues } = cardsOf(text2);
|
|
24348
|
+
const people = [];
|
|
24349
|
+
const organizations = /* @__PURE__ */ new Map();
|
|
24350
|
+
const seen2 = /* @__PURE__ */ new Set();
|
|
24351
|
+
for (const [index, properties] of cards.entries()) {
|
|
24352
|
+
const report = /* @__PURE__ */ __name((message) => {
|
|
24353
|
+
if (!issues.some((one2) => one2.card === index && one2.message === message))
|
|
24354
|
+
issues.push({ card: index, message });
|
|
24355
|
+
}, "report");
|
|
24356
|
+
const values = /* @__PURE__ */ __name((wanted) => properties.filter(({ name: name2 }) => name2 === wanted).map((one2) => textOf(one2, report)).filter(Boolean), "values");
|
|
24357
|
+
const name = nameOf2(properties, report);
|
|
24358
|
+
const phones = [];
|
|
24359
|
+
const unread = [];
|
|
24360
|
+
for (const typed of values("TEL")) {
|
|
24361
|
+
const value = e164(typed, region);
|
|
24362
|
+
if (value !== void 0) {
|
|
24363
|
+
if (!phones.includes(value))
|
|
24364
|
+
phones.push(value);
|
|
24365
|
+
} else {
|
|
24366
|
+
unread.push(typed);
|
|
24367
|
+
issues.push({
|
|
24368
|
+
card: index,
|
|
24369
|
+
message: `${typed} has no country code${region === void 0 ? " and no region was given" : ` in ${region}`}: kept, not matched`
|
|
24370
|
+
});
|
|
24371
|
+
}
|
|
24372
|
+
}
|
|
24373
|
+
const emails = [...new Set(values("EMAIL").map((one2) => one2.replace(/^mailto:/i, "").toLowerCase()))];
|
|
24374
|
+
if (name === void 0 && phones.length === 0 && unread.length === 0 && emails.length === 0) {
|
|
24375
|
+
report("the card holds no name, number or address: left out");
|
|
24376
|
+
continue;
|
|
24377
|
+
}
|
|
24378
|
+
const uid = values("UID")[0];
|
|
24379
|
+
const externalId = uid === void 0 ? hashed("vcard:", [name ?? "", ...[...phones].sort(), ...emails.sort()]) : uid.length <= MAX_ID ? uid : hashed("vcard:", [uid]);
|
|
24380
|
+
if (seen2.has(externalId)) {
|
|
24381
|
+
issues.push({ card: index, message: `another card of the file is ${externalId}: left out` });
|
|
24382
|
+
continue;
|
|
24383
|
+
}
|
|
24384
|
+
seen2.add(externalId);
|
|
24385
|
+
const organization2 = properties.find(({ name: name2 }) => name2 === "ORG");
|
|
24386
|
+
const organizationName = organization2 ? components(decoded(organization2, report))[0] : void 0;
|
|
24387
|
+
const title = values("TITLE")[0];
|
|
24388
|
+
const relations = [];
|
|
24389
|
+
if (organizationName) {
|
|
24390
|
+
const id2 = organizationId(organizationName);
|
|
24391
|
+
if (!organizations.has(id2))
|
|
24392
|
+
organizations.set(id2, {
|
|
24393
|
+
key: id2,
|
|
24394
|
+
type: "organization",
|
|
24395
|
+
external_id: id2,
|
|
24396
|
+
operation: "upsert",
|
|
24397
|
+
fields: { name: organizationName }
|
|
24398
|
+
});
|
|
24399
|
+
const as = title === void 0 ? void 0 : titleWord(title);
|
|
24400
|
+
relations.push({ role: "member-of", type: "organization", external_id: id2, ...as ? { as } : {} });
|
|
24401
|
+
}
|
|
24402
|
+
people.push({
|
|
24403
|
+
key: `person:${externalId}`,
|
|
24404
|
+
type: "person",
|
|
24405
|
+
external_id: externalId,
|
|
24406
|
+
operation: "upsert",
|
|
24407
|
+
fields: {
|
|
24408
|
+
...name === void 0 ? {} : { name },
|
|
24409
|
+
...phones.length ? { phone: phones } : {},
|
|
24410
|
+
...emails.length ? { email: emails } : {},
|
|
24411
|
+
...unread.length ? { phone_unread: unread } : {},
|
|
24412
|
+
...organizationName ? { organization: organizationName } : {},
|
|
24413
|
+
...title === void 0 ? {} : { title }
|
|
24414
|
+
},
|
|
24415
|
+
...relations.length ? { relations } : {}
|
|
24416
|
+
});
|
|
24417
|
+
}
|
|
24418
|
+
return {
|
|
24419
|
+
envelope: {
|
|
24420
|
+
schema_version: 1,
|
|
24421
|
+
source: { provider, account, batch_id: batchId },
|
|
24422
|
+
...region === void 0 ? {} : { options: { phone_region: region } },
|
|
24423
|
+
records: [...organizations.values(), ...people]
|
|
24424
|
+
},
|
|
24425
|
+
issues
|
|
24426
|
+
};
|
|
24427
|
+
}, "envelopeOfVcard");
|
|
24428
|
+
|
|
24429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
24430
|
+
var emptyReceipt = /* @__PURE__ */ __name((dryRun, errors) => ({
|
|
24431
|
+
dryRun,
|
|
24432
|
+
source: null,
|
|
24433
|
+
created: 0,
|
|
24434
|
+
updated: 0,
|
|
24435
|
+
unchanged: 0,
|
|
24436
|
+
deleted: 0,
|
|
24437
|
+
refused: 0,
|
|
24438
|
+
proposed: [],
|
|
24439
|
+
waiting: [],
|
|
24440
|
+
flagged: [],
|
|
24441
|
+
unmatched: [],
|
|
24442
|
+
ignored: [],
|
|
24443
|
+
errors,
|
|
24444
|
+
truncated: false
|
|
24445
|
+
}), "emptyReceipt");
|
|
24446
|
+
var receiptOf = /* @__PURE__ */ __name((dryRun, source, run) => ({
|
|
24447
|
+
dryRun,
|
|
24448
|
+
source: { provider: source.provider, account: source.account, batchId: source.batch_id },
|
|
24449
|
+
created: run.created,
|
|
24450
|
+
updated: run.updated,
|
|
24451
|
+
unchanged: run.unchanged,
|
|
24452
|
+
deleted: run.deleted,
|
|
24453
|
+
refused: run.refused,
|
|
24454
|
+
proposed: run.proposed,
|
|
24455
|
+
waiting: run.waiting.map(({ index, key, missing: missing4 }) => ({ key, pointer: waitingPointer(index, missing4), missing: missing4 })),
|
|
24456
|
+
flagged: run.flagged.map(({ index, ...flag }) => ({ ...flag, pointer: pointerOf("records", index) })),
|
|
24457
|
+
unmatched: run.unmatched.map(({ index, key, reason, candidates }) => ({
|
|
24458
|
+
key,
|
|
24459
|
+
pointer: pointerOf("records", index, "fields"),
|
|
24460
|
+
reason,
|
|
24461
|
+
candidates
|
|
24462
|
+
})),
|
|
24463
|
+
ignored: run.ignored.map(({ index, key, at, reason }) => ({
|
|
24464
|
+
key,
|
|
24465
|
+
pointer: pointerOf("records", index, ...at),
|
|
24466
|
+
reason
|
|
24467
|
+
})),
|
|
24468
|
+
errors: run.errors,
|
|
24469
|
+
truncated: run.truncated
|
|
24470
|
+
}), "receiptOf");
|
|
24471
|
+
var itemOf2 = /* @__PURE__ */ __name((record2, index) => {
|
|
24472
|
+
const errors = recordErrors(record2, index);
|
|
24473
|
+
return { index, record: record2, ...errors.length > 0 ? { errors } : {} };
|
|
24474
|
+
}, "itemOf");
|
|
24475
|
+
var refusedAll = /* @__PURE__ */ __name((dryRun, errors, onIssue) => {
|
|
24476
|
+
for (const error of errors)
|
|
24477
|
+
onIssue?.(error);
|
|
24478
|
+
return emptyReceipt(dryRun, errors);
|
|
24479
|
+
}, "refusedAll");
|
|
24480
|
+
var ingest = /* @__PURE__ */ __name(async (store, envelope, { account, dryRun = false, chunk = 1e3, onIssue }) => {
|
|
24481
|
+
const broken2 = envelopeErrors(envelope, account);
|
|
24482
|
+
if (broken2.length > 0)
|
|
24483
|
+
return refusedAll(dryRun, broken2, onIssue);
|
|
24484
|
+
const { source, records, options: options2 } = envelope;
|
|
24485
|
+
const items = records.map(itemOf2);
|
|
24486
|
+
return receiptOf(dryRun, source, await store.records.run(source, items, { dryRun, chunk, options: options2, onIssue }));
|
|
24487
|
+
}, "ingest");
|
|
24488
|
+
var jsonlLines = /* @__PURE__ */ __name((stream) => createInterface({ input: stream, crlfDelay: Number.POSITIVE_INFINITY }), "jsonlLines");
|
|
24489
|
+
var ingestLines = /* @__PURE__ */ __name(async (store, lines3, { account, dryRun = false, chunk = 1e3, onIssue }) => {
|
|
24490
|
+
const iterator = lines3[Symbol.asyncIterator]();
|
|
24491
|
+
let header = {};
|
|
24492
|
+
for (let next = await iterator.next(); !next.done; next = await iterator.next())
|
|
24493
|
+
if (next.value.trim() !== "" && next.value !== "\uFEFF") {
|
|
24494
|
+
header = jsonLine(next.value);
|
|
24495
|
+
break;
|
|
24496
|
+
}
|
|
24497
|
+
const broken2 = headerErrors(header, account);
|
|
24498
|
+
if (broken2.length > 0) {
|
|
24499
|
+
await iterator.return?.();
|
|
24500
|
+
return refusedAll(dryRun, broken2, onIssue);
|
|
24501
|
+
}
|
|
24502
|
+
const { source, options: options2 } = header;
|
|
24503
|
+
async function* items() {
|
|
24504
|
+
let index = 0;
|
|
24505
|
+
for (let next = await iterator.next(); !next.done; next = await iterator.next()) {
|
|
24506
|
+
if (next.value.trim() === "")
|
|
24507
|
+
continue;
|
|
24508
|
+
yield itemOf2(jsonLine(next.value), index);
|
|
24509
|
+
index += 1;
|
|
24510
|
+
}
|
|
24511
|
+
}
|
|
24512
|
+
__name(items, "items");
|
|
24513
|
+
return receiptOf(dryRun, source, await store.records.run(source, items(), { dryRun, chunk, options: options2, onIssue }));
|
|
24514
|
+
}, "ingestLines");
|
|
24515
|
+
var ingestVcard = /* @__PURE__ */ __name(async (store, text2, { provider, batchId, region, ...options2 }) => {
|
|
24516
|
+
const { envelope, issues } = envelopeOfVcard(text2, {
|
|
24517
|
+
provider,
|
|
24518
|
+
account: options2.account,
|
|
24519
|
+
batchId,
|
|
24520
|
+
...region === void 0 ? {} : { region }
|
|
24521
|
+
});
|
|
24522
|
+
return { ...await ingest(store, envelope, options2), vcard: issues };
|
|
24523
|
+
}, "ingestVcard");
|
|
24524
|
+
|
|
24250
24525
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
24251
24526
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
24252
24527
|
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
@@ -24747,7 +25022,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
24747
25022
|
}, "storedNeighbours");
|
|
24748
25023
|
|
|
24749
25024
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
24750
|
-
import { createHash as
|
|
25025
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
24751
25026
|
var DAY2 = 864e5;
|
|
24752
25027
|
var MAX_TIME = 864e13;
|
|
24753
25028
|
var CONTEXT_CHUNK_DAYS = 90;
|
|
@@ -24963,7 +25238,7 @@ var projectGatheringRequest = /* @__PURE__ */ __name((input, now) => {
|
|
|
24963
25238
|
]));
|
|
24964
25239
|
if (budgets.maxPageBytes > budgets.maxReadBytes)
|
|
24965
25240
|
budgets.maxPageBytes = budgets.maxReadBytes;
|
|
24966
|
-
const fingerprint =
|
|
25241
|
+
const fingerprint = createHash3("sha256").update(JSON.stringify([
|
|
24967
25242
|
"project-gathering-v1",
|
|
24968
25243
|
project2,
|
|
24969
25244
|
lanes,
|
|
@@ -24975,7 +25250,7 @@ var projectGatheringRequest = /* @__PURE__ */ __name((input, now) => {
|
|
|
24975
25250
|
asOf,
|
|
24976
25251
|
fetch2
|
|
24977
25252
|
])).digest("hex");
|
|
24978
|
-
const linkedKey = linkedChats.length ?
|
|
25253
|
+
const linkedKey = linkedChats.length ? createHash3("sha256").update(JSON.stringify(linkedChats.map((c) => c.ref))).digest("hex") : void 0;
|
|
24979
25254
|
const runKey = input.runKey === void 0 ? fingerprint : text(input.runKey, "runKey", 256);
|
|
24980
25255
|
if (input.checkpoint !== void 0 && typeof input.checkpoint !== "string")
|
|
24981
25256
|
fail("checkpoint must be text", "checkpoint");
|
|
@@ -25040,7 +25315,7 @@ var projectUnits = /* @__PURE__ */ __name((plan, window3) => {
|
|
|
25040
25315
|
fail(`${units2.length} lane \xD7 source \xD7 90-day reads exceed ${LIMITS.units}; narrow the lanes, sources or window`);
|
|
25041
25316
|
return units2;
|
|
25042
25317
|
}, "projectUnits");
|
|
25043
|
-
var seenKey = /* @__PURE__ */ __name((ref) =>
|
|
25318
|
+
var seenKey = /* @__PURE__ */ __name((ref) => createHash3("sha256").update(ref).digest("base64url").slice(0, 16), "seenKey");
|
|
25044
25319
|
var encodeCheckpoint = /* @__PURE__ */ __name((checkpoint) => Buffer.from(JSON.stringify(checkpoint)).toString("base64url"), "encodeCheckpoint");
|
|
25045
25320
|
var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
25046
25321
|
let value;
|
|
@@ -26126,17 +26401,17 @@ import { setTimeout as sleep3 } from "node:timers/promises";
|
|
|
26126
26401
|
import { lstat } from "node:fs/promises";
|
|
26127
26402
|
|
|
26128
26403
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
26129
|
-
import { createHash as
|
|
26404
|
+
import { createHash as createHash5, randomUUID as randomUUID2 } from "node:crypto";
|
|
26130
26405
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
26131
26406
|
import { join as join2 } from "node:path";
|
|
26132
26407
|
|
|
26133
26408
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
26134
|
-
import { createHash as
|
|
26409
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
26135
26410
|
var metadataLimit = 16384;
|
|
26136
26411
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
26137
26412
|
var missing3 = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missing");
|
|
26138
26413
|
var fingerprintPartial = /* @__PURE__ */ __name(async (file2, signal, length) => {
|
|
26139
|
-
const hash3 =
|
|
26414
|
+
const hash3 = createHash4("sha256");
|
|
26140
26415
|
let size4 = 0;
|
|
26141
26416
|
const buffer = Buffer.alloc(65536);
|
|
26142
26417
|
for (; ; ) {
|
|
@@ -26304,7 +26579,7 @@ var NativeRecordingPartialStore = class {
|
|
|
26304
26579
|
this.options = Object.freeze({ ...options2 });
|
|
26305
26580
|
if (typeof root !== "string" || !root || root.includes("\0") || !/^\.[a-zA-Z0-9][a-zA-Z0-9._-]{0,95}-$/.test(options2.prefix) || typeof options2.persistent !== "boolean" || !Number.isSafeInteger(options2.maxBytes) || options2.maxBytes <= 0 || Object.values(this.locator).some((value) => typeof value !== "string" || !value.trim() || /[\0\r\n]/.test(value)))
|
|
26306
26581
|
throw new CliError("validation_error", "invalid native recording partial options");
|
|
26307
|
-
const key = options2.persistent ?
|
|
26582
|
+
const key = options2.persistent ? createHash5("sha256").update(partialIdentity(this.locator)).digest("hex") : randomUUID2();
|
|
26308
26583
|
this.path = join2(root, `${options2.prefix}${key}.part`);
|
|
26309
26584
|
this.metadataPath = join2(root, `${options2.prefix}${key}.json`);
|
|
26310
26585
|
}
|
|
@@ -26390,7 +26665,7 @@ var NativeRecordingPartialStore = class {
|
|
|
26390
26665
|
};
|
|
26391
26666
|
|
|
26392
26667
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
26393
|
-
import { createHash as
|
|
26668
|
+
import { createHash as createHash6 } from "node:crypto";
|
|
26394
26669
|
import { link as link2 } from "node:fs/promises";
|
|
26395
26670
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
26396
26671
|
|
|
@@ -26518,7 +26793,7 @@ var NativeRecordingPublication = class {
|
|
|
26518
26793
|
throw new CliError("validation_error", "invalid native recording publication options");
|
|
26519
26794
|
this.scope = partialIdentity(locator);
|
|
26520
26795
|
this.options = Object.freeze({ ...options2, codec: Object.freeze({ ...options2.codec }) });
|
|
26521
|
-
this.journalPath = join4(root, `${options2.prefix}${
|
|
26796
|
+
this.journalPath = join4(root, `${options2.prefix}${createHash6("sha256").update(this.scope).digest("hex")}.json`);
|
|
26522
26797
|
this.finalPath = join4(root, options2.filename);
|
|
26523
26798
|
if (this.finalPath === this.journalPath)
|
|
26524
26799
|
throw new CliError("validation_error", "recording publication paths must be distinct");
|
|
@@ -26576,10 +26851,10 @@ var NativeRecordingPublication = class {
|
|
|
26576
26851
|
};
|
|
26577
26852
|
|
|
26578
26853
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
26579
|
-
import { createHash as
|
|
26854
|
+
import { createHash as createHash7 } from "node:crypto";
|
|
26580
26855
|
import { readdir } from "node:fs/promises";
|
|
26581
26856
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
26582
|
-
var mediaKey = /* @__PURE__ */ __name((one2) =>
|
|
26857
|
+
var mediaKey = /* @__PURE__ */ __name((one2) => createHash7("sha256").update(JSON.stringify([one2.provider, one2.account, one2.chat, one2.message, one2.position])).digest("hex"), "mediaKey");
|
|
26583
26858
|
var mediaManifestName = /* @__PURE__ */ __name((one2) => `.media-archive-${mediaKey(one2)}.json`, "mediaManifestName");
|
|
26584
26859
|
var missingMediaFile = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missingMediaFile");
|
|
26585
26860
|
var parseMediaEntry = /* @__PURE__ */ __name((value) => {
|
|
@@ -26606,7 +26881,7 @@ var mediaFingerprint = /* @__PURE__ */ __name(async (path, signal) => {
|
|
|
26606
26881
|
signal?.throwIfAborted();
|
|
26607
26882
|
const file2 = await openOrdinaryFile(path);
|
|
26608
26883
|
try {
|
|
26609
|
-
const hash3 =
|
|
26884
|
+
const hash3 = createHash7("sha256");
|
|
26610
26885
|
let size4 = 0;
|
|
26611
26886
|
for await (const chunk of file2.createReadStream({ autoClose: false, ...signal ? { signal } : {} })) {
|
|
26612
26887
|
signal?.throwIfAborted();
|
|
@@ -28958,13 +29233,13 @@ var answerers = /* @__PURE__ */ __name(async (store, refs, accounts) => {
|
|
|
28958
29233
|
const parts = ref.slice(7).split("/");
|
|
28959
29234
|
if (parts.length !== 3 || parts.some((part) => !part))
|
|
28960
29235
|
invalid2("answerer needs person:<provider>/<account>/<id>");
|
|
28961
|
-
let
|
|
29236
|
+
let decoded2;
|
|
28962
29237
|
try {
|
|
28963
|
-
|
|
29238
|
+
decoded2 = parts.map(decodeURIComponent);
|
|
28964
29239
|
} catch {
|
|
28965
29240
|
return invalid2("invalid answerer encoding");
|
|
28966
29241
|
}
|
|
28967
|
-
const [provider, account, id2] =
|
|
29242
|
+
const [provider, account, id2] = decoded2;
|
|
28968
29243
|
if (!accounts.some((one2) => one2.provider === provider && one2.account === account))
|
|
28969
29244
|
invalid2("answerer account is outside this query");
|
|
28970
29245
|
return { provider, account, id: id2 };
|
|
@@ -29219,7 +29494,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29219
29494
|
}), "adminStatisticsService");
|
|
29220
29495
|
|
|
29221
29496
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
29222
|
-
import { createHash as
|
|
29497
|
+
import { createHash as createHash8, randomUUID as randomUUID4 } from "node:crypto";
|
|
29223
29498
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
29224
29499
|
var validateRepair = /* @__PURE__ */ __name((messenger, options2) => {
|
|
29225
29500
|
const maxGaps = options2.maxGaps ?? GAP_BOUNDS.maxGaps;
|
|
@@ -29260,7 +29535,7 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
29260
29535
|
limits: { ...GAP_BOUNDS, pageSize: (deps.messenger.fetching ?? FETCHING).page },
|
|
29261
29536
|
gaps,
|
|
29262
29537
|
unknown: unknown3,
|
|
29263
|
-
fingerprint:
|
|
29538
|
+
fingerprint: createHash8("sha256").update(JSON.stringify(identity)).digest("hex")
|
|
29264
29539
|
};
|
|
29265
29540
|
}, "plan");
|
|
29266
29541
|
const repair = /* @__PURE__ */ __name(async (chat, options2 = {}) => {
|
|
@@ -29356,7 +29631,7 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
29356
29631
|
}, "gapsService");
|
|
29357
29632
|
|
|
29358
29633
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
29359
|
-
import { createHash as
|
|
29634
|
+
import { createHash as createHash10 } from "node:crypto";
|
|
29360
29635
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
29361
29636
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
29362
29637
|
|
|
@@ -30089,10 +30364,10 @@ var rootIs = /* @__PURE__ */ __name((node, name, namespaces) => {
|
|
|
30089
30364
|
return element.namespaceURI;
|
|
30090
30365
|
}, "rootIs");
|
|
30091
30366
|
var target = /* @__PURE__ */ __name((owner, reference) => {
|
|
30092
|
-
const
|
|
30093
|
-
if (/^[a-z][a-z0-9+.-]*:|^[\\/]|\\/i.test(
|
|
30367
|
+
const decoded2 = decodeURIComponent(reference.split(/[?#]/)[0] ?? "");
|
|
30368
|
+
if (/^[a-z][a-z0-9+.-]*:|^[\\/]|\\/i.test(decoded2) || [...decoded2].some((character) => character.charCodeAt(0) < 32))
|
|
30094
30369
|
throw new Error("external_part");
|
|
30095
|
-
const path = posix.normalize(posix.join(posix.dirname(owner),
|
|
30370
|
+
const path = posix.normalize(posix.join(posix.dirname(owner), decoded2));
|
|
30096
30371
|
if (path.startsWith("../") || !path || path === ".")
|
|
30097
30372
|
throw new Error("external_part");
|
|
30098
30373
|
return path;
|
|
@@ -30466,11 +30741,11 @@ var startsWith = /* @__PURE__ */ __name((bytes2, magic) => bytes2.length >= magi
|
|
|
30466
30741
|
var extensionOf = /* @__PURE__ */ __name(({ name, path }) => extname2(name ?? path).toLowerCase(), "extensionOf");
|
|
30467
30742
|
var capped2 = /* @__PURE__ */ __name((text2) => text2.length > MAX_TEXT_CHARS ? text2.slice(0, MAX_TEXT_CHARS) : text2, "capped");
|
|
30468
30743
|
var derived = /* @__PURE__ */ __name((bytes2, extractor, read2) => {
|
|
30469
|
-
const
|
|
30470
|
-
if ("error" in
|
|
30471
|
-
return { status: "unreadable", extractor, error:
|
|
30744
|
+
const decoded2 = decodeText(bytes2);
|
|
30745
|
+
if ("error" in decoded2)
|
|
30746
|
+
return { status: "unreadable", extractor, error: decoded2.error };
|
|
30472
30747
|
try {
|
|
30473
|
-
const text2 = read2(
|
|
30748
|
+
const text2 = read2(decoded2.text);
|
|
30474
30749
|
return text2 === "" ? { status: "needs-agent", extractor } : { status: "extracted", text: capped2(text2), extractor };
|
|
30475
30750
|
} catch (error) {
|
|
30476
30751
|
if (error instanceof ReaderLimit)
|
|
@@ -30797,10 +31072,10 @@ var html = {
|
|
|
30797
31072
|
version: "v2",
|
|
30798
31073
|
accepts: /* @__PURE__ */ __name((hint) => HTML.has(extensionOf(hint)) || hint.mime === "text/html" || hint.mime === "application/xhtml+xml", "accepts"),
|
|
30799
31074
|
read: /* @__PURE__ */ __name(async (bytes2, _hint, context2) => {
|
|
30800
|
-
const
|
|
30801
|
-
if (!("error" in
|
|
31075
|
+
const decoded2 = decodeText(bytes2);
|
|
31076
|
+
if (!("error" in decoded2)) {
|
|
30802
31077
|
try {
|
|
30803
|
-
const page = await readPage(
|
|
31078
|
+
const page = await readPage(decoded2.text, context2.load);
|
|
30804
31079
|
if (page)
|
|
30805
31080
|
return page;
|
|
30806
31081
|
} catch (error) {
|
|
@@ -30811,7 +31086,7 @@ var html = {
|
|
|
30811
31086
|
}
|
|
30812
31087
|
}
|
|
30813
31088
|
const fallback = derived(bytes2, "html:v1", htmlText);
|
|
30814
|
-
const title = "error" in
|
|
31089
|
+
const title = "error" in decoded2 ? "" : titleOf(decoded2.text);
|
|
30815
31090
|
return fallback.status === "extracted" && title ? { ...fallback, metadata: { title } } : fallback;
|
|
30816
31091
|
}, "read")
|
|
30817
31092
|
};
|
|
@@ -32320,7 +32595,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
32320
32595
|
}, "pdfPreview");
|
|
32321
32596
|
|
|
32322
32597
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
32323
|
-
import { createHash as
|
|
32598
|
+
import { createHash as createHash9 } from "node:crypto";
|
|
32324
32599
|
import { constants } from "node:fs";
|
|
32325
32600
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
32326
32601
|
var MAX_CHUNK_BYTES = 1024 * 1024;
|
|
@@ -32353,7 +32628,7 @@ var retainedBytes = /* @__PURE__ */ __name(async (path, options2, captureFile =
|
|
|
32353
32628
|
const bytes2 = Buffer.alloc(Math.min(chunkBytes, opened.size - offsetBytes));
|
|
32354
32629
|
const capturedFile = captureFile ? Buffer.alloc(opened.size) : void 0;
|
|
32355
32630
|
const head = Buffer.alloc(32);
|
|
32356
|
-
const hash3 =
|
|
32631
|
+
const hash3 = createHash9("sha256");
|
|
32357
32632
|
let seen2 = 0;
|
|
32358
32633
|
let copied = 0;
|
|
32359
32634
|
const scratch = Buffer.alloc(65536);
|
|
@@ -32591,7 +32866,7 @@ var outcome = /* @__PURE__ */ __name(async (file2, path, load, signal, noFollow
|
|
|
32591
32866
|
} finally {
|
|
32592
32867
|
await handle.close();
|
|
32593
32868
|
}
|
|
32594
|
-
const sha =
|
|
32869
|
+
const sha = createHash10("sha256").update(bytes2).digest("hex");
|
|
32595
32870
|
const isPdf = Buffer.from(bytes2.subarray(0, 5)).toString() === "%PDF-";
|
|
32596
32871
|
const ocrCandidate = ocr !== void 0 && (known2 === "image" || isPdf);
|
|
32597
32872
|
const localKind = documentKind(hint);
|
|
@@ -32878,7 +33153,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32878
33153
|
nextOffsetBytes: null,
|
|
32879
33154
|
complete: true,
|
|
32880
33155
|
base64: rendered.bytes.toString("base64"),
|
|
32881
|
-
sha256:
|
|
33156
|
+
sha256: createHash10("sha256").update(rendered.bytes).digest("hex"),
|
|
32882
33157
|
pdf: {
|
|
32883
33158
|
page: rendered.page,
|
|
32884
33159
|
pageCount: rendered.pageCount,
|
|
@@ -35047,7 +35322,7 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
35047
35322
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
35048
35323
|
|
|
35049
35324
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
35050
|
-
import { createHash as
|
|
35325
|
+
import { createHash as createHash11 } from "node:crypto";
|
|
35051
35326
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
35052
35327
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
35053
35328
|
|
|
@@ -35179,7 +35454,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35179
35454
|
const vector = await use.embedImage(bytes2);
|
|
35180
35455
|
pending.push({
|
|
35181
35456
|
attachmentPk: picture.attachmentPk,
|
|
35182
|
-
hash:
|
|
35457
|
+
hash: createHash11("sha256").update(bytes2).digest("hex"),
|
|
35183
35458
|
bytes: bytes2.length,
|
|
35184
35459
|
occurredAt: picture.sentAt,
|
|
35185
35460
|
vector
|
|
@@ -38583,7 +38858,7 @@ var MESSAGE_SEARCH_COMMANDS = [
|
|
|
38583
38858
|
"admin-statistics"
|
|
38584
38859
|
];
|
|
38585
38860
|
var NAME = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
38586
|
-
var
|
|
38861
|
+
var nameOf3 = /* @__PURE__ */ __name((value) => {
|
|
38587
38862
|
const name = value.trim().toLowerCase();
|
|
38588
38863
|
if (!NAME.test(name) || /^\d+$/.test(name))
|
|
38589
38864
|
throw new CliError("validation_error", `"${singleLine(value)}" cannot name a saved search \u2014 use up to 64 letters a\u2013z, digits and hyphens, not only digits`, { reason: "name.invalid" });
|
|
@@ -38638,13 +38913,13 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
38638
38913
|
if (isAdminSelection(params.selection)) {
|
|
38639
38914
|
const selected = await readAdminSelection(store, params.selection);
|
|
38640
38915
|
const normalized2 = typeof params.selection === "string" ? JSON.parse(params.selection) : params.selection;
|
|
38641
|
-
return store.searches.saveSearch(
|
|
38916
|
+
return store.searches.saveSearch(nameOf3(name), searchRecordOf("admin-statistics", {
|
|
38642
38917
|
adminReport: selected.options.report,
|
|
38643
38918
|
selection: normalized2,
|
|
38644
38919
|
timezone: selected.base.timezone
|
|
38645
38920
|
}), { replace });
|
|
38646
38921
|
}
|
|
38647
|
-
return store.searches.saveSearch(
|
|
38922
|
+
return store.searches.saveSearch(nameOf3(name), searchRecordOf(params.target ? params.target === "messages" ? "message-top" : "author-top" : params.by === void 0 ? "search" : "stats", checked(params)), {
|
|
38648
38923
|
replace
|
|
38649
38924
|
});
|
|
38650
38925
|
}), "create"),
|
|
@@ -38975,8 +39250,8 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38975
39250
|
}, "topicsService");
|
|
38976
39251
|
|
|
38977
39252
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
38978
|
-
import { createHash as
|
|
38979
|
-
var hash2 = /* @__PURE__ */ __name((value) =>
|
|
39253
|
+
import { createHash as createHash12, randomUUID as randomUUID5 } from "node:crypto";
|
|
39254
|
+
var hash2 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
38980
39255
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
38981
39256
|
if (!Number.isSafeInteger(value) || value < minimum)
|
|
38982
39257
|
throw new CliError("validation_error", `${name} must be a safe integer of at least ${minimum}`);
|
|
@@ -39131,7 +39406,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
39131
39406
|
}, "searchMeetingHits");
|
|
39132
39407
|
|
|
39133
39408
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
39134
|
-
import { createHash as
|
|
39409
|
+
import { createHash as createHash13 } from "node:crypto";
|
|
39135
39410
|
var scopeKeys = [
|
|
39136
39411
|
"accountId",
|
|
39137
39412
|
"meetingId",
|
|
@@ -39229,7 +39504,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
39229
39504
|
add({ name: alias.name, kind: "alias", aliasId: alias.id });
|
|
39230
39505
|
if (!terms.length || terms.length > maxTerms)
|
|
39231
39506
|
return fail2("project discovery names exceed the selected term budget or contain no words");
|
|
39232
|
-
const key =
|
|
39507
|
+
const key = createHash13("sha256").update(JSON.stringify([query, found.fingerprint, project2, terms, scopeKeys.map((name) => input[name] ?? null)])).digest("hex");
|
|
39233
39508
|
const previous = cursorOf2(cursor, key, terms.length);
|
|
39234
39509
|
const termIndex = previous?.term ?? 0;
|
|
39235
39510
|
const term = terms[termIndex];
|
|
@@ -39266,7 +39541,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
39266
39541
|
}, "readMeetingProjectDiscovery");
|
|
39267
39542
|
|
|
39268
39543
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/text-model-choice.js
|
|
39269
|
-
import { createHash as
|
|
39544
|
+
import { createHash as createHash14 } from "node:crypto";
|
|
39270
39545
|
import { existsSync as existsSync3 } from "node:fs";
|
|
39271
39546
|
var useTextModel = /* @__PURE__ */ __name(async (id2, { env, command }) => {
|
|
39272
39547
|
const model = textModel(id2, env);
|
|
@@ -39372,7 +39647,7 @@ var addCustomTextModel = /* @__PURE__ */ __name(async (id2, payload, { env, fetc
|
|
|
39372
39647
|
if (!response.ok)
|
|
39373
39648
|
throw new CliError("network_error", `${name} could not be downloaded: HTTP ${response.status}`);
|
|
39374
39649
|
const bytes2 = Buffer.from(await response.arrayBuffer());
|
|
39375
|
-
files.push({ name, url: url(name), sha256:
|
|
39650
|
+
files.push({ name, url: url(name), sha256: createHash14("sha256").update(bytes2).digest("hex"), bytes: bytes2.length });
|
|
39376
39651
|
}
|
|
39377
39652
|
const card = revision.output.cardData;
|
|
39378
39653
|
const checked2 = safeParse(CustomTextModelShape, {
|
|
@@ -39397,7 +39672,7 @@ var addCustomTextModel = /* @__PURE__ */ __name(async (id2, payload, { env, fetc
|
|
|
39397
39672
|
}, "addCustomTextModel");
|
|
39398
39673
|
|
|
39399
39674
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
39400
|
-
import { createHash as
|
|
39675
|
+
import { createHash as createHash15 } from "node:crypto";
|
|
39401
39676
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
39402
39677
|
ref: cue.reference,
|
|
39403
39678
|
fingerprint: cue.fingerprint,
|
|
@@ -39511,7 +39786,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
39511
39786
|
},
|
|
39512
39787
|
items: picked
|
|
39513
39788
|
};
|
|
39514
|
-
return { ...packet, fingerprint:
|
|
39789
|
+
return { ...packet, fingerprint: createHash15("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
39515
39790
|
}, "readMeetingHitContext");
|
|
39516
39791
|
|
|
39517
39792
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
@@ -40424,7 +40699,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
40424
40699
|
}, "servicesFor");
|
|
40425
40700
|
|
|
40426
40701
|
// node_modules/.pnpm/@wirecat+cli-core@0.613.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_562287bbc40b862fa82b63f307e02b11/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
40427
|
-
import { createHash as
|
|
40702
|
+
import { createHash as createHash16 } from "node:crypto";
|
|
40428
40703
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
40429
40704
|
import { createConnection, createServer } from "node:net";
|
|
40430
40705
|
import { tmpdir } from "node:os";
|
|
@@ -40445,7 +40720,7 @@ var relayPath = /* @__PURE__ */ __name((lockPath) => {
|
|
|
40445
40720
|
const beside = lockPath.replace(/\.lock$/, ".sock");
|
|
40446
40721
|
if (beside.length <= MAX_SOCKET_PATH)
|
|
40447
40722
|
return beside;
|
|
40448
|
-
const hash3 =
|
|
40723
|
+
const hash3 = createHash16("sha256").update(beside).digest("hex").slice(0, 16);
|
|
40449
40724
|
const name = join12(`wirecat-relay-${process.getuid?.() ?? "user"}`, `${hash3}.sock`);
|
|
40450
40725
|
const temporary = join12(tmpdir(), name);
|
|
40451
40726
|
if (temporary.length <= MAX_SOCKET_PATH || process.platform === "win32")
|
|
@@ -40721,9 +40996,13 @@ export {
|
|
|
40721
40996
|
AGENDA_QUERY,
|
|
40722
40997
|
agendaItem,
|
|
40723
40998
|
excerpt,
|
|
40999
|
+
isVcard,
|
|
40724
41000
|
previewProjectAnnotationSnapshot,
|
|
40725
41001
|
snapshotProjectAnnotations,
|
|
40726
41002
|
ingest,
|
|
41003
|
+
jsonlLines,
|
|
41004
|
+
ingestLines,
|
|
41005
|
+
ingestVcard,
|
|
40727
41006
|
BUILT_IN_PURPOSES,
|
|
40728
41007
|
purposesOf,
|
|
40729
41008
|
purposeList,
|