@wirecat/cli-memo 0.131.51 → 0.131.53
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/{all-profiles-3R3VE3W2.js → all-profiles-PJR2VHDP.js} +5 -5
- package/dist/bundle/{anthropic-QVYJRACM.js → anthropic-ZUDIWREK.js} +3 -3
- package/dist/bundle/{app-server-T3D2PIGZ.js → app-server-EYNQ4L2V.js} +35 -35
- package/dist/bundle/auto-JV4T2URZ.js +86 -0
- package/dist/bundle/{bun-DTDD2OHK.js → bun-W2ZP6I6Z.js} +2 -2
- package/dist/bundle/{bun-sqlite-DWICJAH3.js → bun-sqlite-T2CTJ6AR.js} +2 -2
- package/dist/bundle/{chunk-QFC7V5VW.js → chunk-26QKDK5P.js} +5 -5
- package/dist/bundle/{chunk-H65NWA3X.js → chunk-2NVP4FZH.js} +1 -1
- package/dist/bundle/{chunk-O5UP2KZL.js → chunk-34GJQ4ZR.js} +1 -1
- package/dist/bundle/{chunk-RL2DSQCD.js → chunk-3MWNNJII.js} +8 -8
- package/dist/bundle/{chunk-OBVKXHOH.js → chunk-4335SGVD.js} +2287 -1326
- package/dist/bundle/{chunk-OJFRMK2W.js → chunk-4VQ7FPNW.js} +3 -3
- package/dist/bundle/{chunk-5ZGOT57S.js → chunk-5UM2OEOR.js} +2 -2
- package/dist/bundle/{chunk-WPW6ULD7.js → chunk-643B3X4D.js} +2 -2
- package/dist/bundle/{chunk-56BBTOS2.js → chunk-6NJ5OI2S.js} +1 -1
- package/dist/bundle/{chunk-3OL3QRFS.js → chunk-7ZO2LAFF.js} +5 -5
- package/dist/bundle/{chunk-6MEVHKIO.js → chunk-AF2ZDP3M.js} +1 -1
- package/dist/bundle/{chunk-REROHDUR.js → chunk-AYY5CYJJ.js} +1 -1
- package/dist/bundle/{chunk-SXVPRYEF.js → chunk-B5VQSSL2.js} +15 -12
- package/dist/bundle/{chunk-E7TMOUWZ.js → chunk-BC7N6IQ6.js} +1 -1
- package/dist/bundle/{chunk-PX2B5ZRL.js → chunk-BEO6VJ2E.js} +102 -60
- package/dist/bundle/{chunk-4RHIJMRX.js → chunk-CADGAURO.js} +30 -28
- package/dist/bundle/{chunk-LYUVULFK.js → chunk-CQPZUKTI.js} +311 -268
- package/dist/bundle/{chunk-AEVTXHTY.js → chunk-D63QZQR7.js} +4 -4
- package/dist/bundle/{chunk-HRLQQLVD.js → chunk-DDD3CXHR.js} +20 -20
- package/dist/bundle/{chunk-ROP27ZJU.js → chunk-F3BUTC2N.js} +51 -36
- package/dist/bundle/{chunk-V3TELYLZ.js → chunk-FUINFNUC.js} +1 -1
- package/dist/bundle/{chunk-XGNNI3S3.js → chunk-GESLAB4N.js} +2 -2
- package/dist/bundle/{chunk-YPLKNKAD.js → chunk-I3TF3CDE.js} +4 -4
- package/dist/bundle/{chunk-GSCGRBEQ.js → chunk-IRFHHNSX.js} +182 -154
- package/dist/bundle/{chunk-FJ3DAE4M.js → chunk-IVDBHH3N.js} +1 -1
- package/dist/bundle/{chunk-E3WIMCV5.js → chunk-JB43Q2QL.js} +1 -1
- package/dist/bundle/{chunk-66A646SL.js → chunk-JBQP2M7J.js} +7 -7
- package/dist/bundle/{chunk-5JY464PN.js → chunk-JGY2PJ3N.js} +12 -12
- package/dist/bundle/{chunk-ETD2DRJD.js → chunk-KK2ATSEC.js} +6 -6
- package/dist/bundle/{chunk-JINNS3FI.js → chunk-KTVYCPJW.js} +1 -1
- package/dist/bundle/{chunk-JBSMBHTM.js → chunk-LBGZT3W4.js} +5 -5
- package/dist/bundle/{chunk-UQ2OA6EM.js → chunk-LCE5LBZC.js} +4 -4
- package/dist/bundle/{chunk-ZC2LNXGO.js → chunk-LCP4TVBX.js} +1 -1
- package/dist/bundle/{chunk-O5Z74SBZ.js → chunk-MFVZXEQN.js} +23 -21
- package/dist/bundle/{chunk-MVV32ZTO.js → chunk-MGDBKE7E.js} +7 -15
- package/dist/bundle/{chunk-PWYCF76F.js → chunk-MU4MPJCU.js} +2 -2
- package/dist/bundle/{chunk-XN5YDZY7.js → chunk-MV5W4FLV.js} +1 -1
- package/dist/bundle/{chunk-6O37NSG6.js → chunk-O7CBAY6J.js} +4 -4
- package/dist/bundle/{chunk-4A6JOJLR.js → chunk-OKERVM3M.js} +4 -4
- package/dist/bundle/{chunk-GBWOMPZ7.js → chunk-OSPAMIIY.js} +3 -3
- package/dist/bundle/{chunk-QIFK3EZM.js → chunk-P3MKPY7D.js} +37 -9
- package/dist/bundle/{chunk-4GWFRZ2U.js → chunk-P5UTNYA7.js} +58 -1
- package/dist/bundle/{chunk-ECLBZGWI.js → chunk-PHP3T567.js} +3 -3
- package/dist/bundle/{chunk-CPLYNBAJ.js → chunk-PSJB456T.js} +1 -1
- package/dist/bundle/{chunk-4MWP6Z3W.js → chunk-RSBROHX4.js} +1 -1
- package/dist/bundle/{chunk-CZOBBAXM.js → chunk-RX6JTLKD.js} +7 -7
- package/dist/bundle/{chunk-JCNBJ3FN.js → chunk-SR3ZNX24.js} +370 -152
- package/dist/bundle/{chunk-UDAATSWZ.js → chunk-T5WGWLY2.js} +10 -10
- package/dist/bundle/{chunk-AWLAMVNY.js → chunk-UBZN4EWJ.js} +4 -4
- package/dist/bundle/{chunk-526KVXRI.js → chunk-VBYV6XQI.js} +2 -2
- package/dist/bundle/{chunk-YZB5IL4L.js → chunk-VPCNLTME.js} +2 -2
- package/dist/bundle/{chunk-BUHTAMPF.js → chunk-VQTU4ILC.js} +1 -1
- package/dist/bundle/{chunk-FZ4GVE36.js → chunk-VXZ7FWKU.js} +2 -2
- package/dist/bundle/{chunk-PNNM72BO.js → chunk-WNQUOEUV.js} +7 -4
- package/dist/bundle/{chunk-7C3MP5LH.js → chunk-WXFNUZZU.js} +5 -5
- package/dist/bundle/{chunk-H7RSMNHL.js → chunk-WYZDNDQ5.js} +489 -407
- package/dist/bundle/{chunk-N3UA5PO4.js → chunk-ZTM4UUCP.js} +9 -9
- package/dist/bundle/{command-contract-OTVOQLZS.js → command-contract-EWPKHGAZ.js} +11 -11
- package/dist/bundle/{decode-ISKRNDDM.js → decode-UWT3Y66W.js} +2 -2
- package/dist/bundle/{echarts-TINXXXCB.js → echarts-7VGTR45R.js} +2 -2
- package/dist/bundle/{embed-R2KJDGEX.js → embed-CM2QSTNK.js} +3 -3
- package/dist/bundle/{embedder-X2Y5RLKE.js → embedder-CDCAMVV7.js} +6 -6
- package/dist/bundle/{entry-2MUKT36Z.js → entry-WHEWBNJL.js} +4 -4
- package/dist/bundle/failure-XQ7TMBYM.js +66 -0
- package/dist/bundle/{first-run-6BSAM4BD.js → first-run-ZBIQO5RZ.js} +5 -5
- package/dist/bundle/{first-screen-ALXB4ONR.js → first-screen-CUAY5N6E.js} +12 -12
- package/dist/bundle/{instructions-E5NBM2NJ.js → instructions-LYKSTUGQ.js} +1 -1
- package/dist/bundle/{mcp-YUPBMZPV.js → mcp-I72UY3QP.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-NBHZ4XWV.js → node-LFRTSZBZ.js} +2 -2
- package/dist/bundle/{node-sqlite-3CBWCPNC.js → node-sqlite-Y47T5FTT.js} +3 -3
- package/dist/bundle/{oauth-L5XC2THD.js → oauth-YM5C6VS3.js} +4 -4
- package/dist/bundle/{open-WR6QQPVB.js → open-WPA4DW5G.js} +2 -2
- package/dist/bundle/{openai-MCPELYCJ.js → openai-RCPT23DA.js} +7 -7
- package/dist/bundle/{process-EAEC2FBD.js → process-P2X2KFMR.js} +1 -1
- package/dist/bundle/{program-WKKBFQIW.js → program-LE3UATKG.js} +62 -60
- package/dist/bundle/{prompt-M4Z35LQ5.js → prompt-65WPTVYC.js} +2 -2
- package/dist/bundle/{recognize-VT6NKW6D.js → recognize-MEFMK7HT.js} +1 -1
- package/dist/bundle/{remote-6QTPH5PJ.js → remote-4XIR3ZYK.js} +4 -4
- package/dist/bundle/{rerank-MJYLXZ4K.js → rerank-YRLAXFFL.js} +4 -4
- package/dist/bundle/{serve-KQ6OL3OH.js → serve-6SPZH6CY.js} +6 -6
- package/dist/bundle/server-FB75UHSF.js +48 -0
- package/dist/bundle/server-IELXA6S2.js +61 -0
- package/dist/bundle/{server-UJIH2SBV.js → server-MU43SKL5.js} +50 -50
- package/dist/bundle/{state-2PDCOSJN.js → state-G34NVZ7F.js} +3 -3
- package/dist/bundle/{store-SXYAS5EI.js → store-6U4SYK4Q.js} +17 -9
- package/dist/bundle/store-maintenance-command-ONVPBZLT.js +48 -0
- package/dist/bundle/update-TO3RIYTH.js +69 -0
- package/dist/doctor/command.d.ts +30 -0
- package/dist/doctor/command.d.ts.map +1 -1
- package/dist/doctor/command.js +1 -1
- package/dist/doctor/command.js.map +1 -1
- package/dist/failure.js +2 -2
- package/dist/failure.js.map +1 -1
- package/dist/knowledge/relationships-scan.d.ts.map +1 -1
- package/dist/knowledge/relationships-scan.js +4 -3
- package/dist/knowledge/relationships-scan.js.map +1 -1
- package/dist/knowledge/relationships.d.ts +5 -1
- package/dist/knowledge/relationships.d.ts.map +1 -1
- package/dist/run/import.d.ts.map +1 -1
- package/dist/run/import.js +3 -2
- package/dist/run/import.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skills/morning-digest/SKILL.md +38 -13
- package/dist/bundle/auto-XJCSM7WE.js +0 -86
- package/dist/bundle/failure-KYUARIL2.js +0 -66
- package/dist/bundle/server-AVAJTC5G.js +0 -61
- package/dist/bundle/server-QAFF3RP5.js +0 -48
- package/dist/bundle/store-maintenance-command-ARTXRVYD.js +0 -48
- package/dist/bundle/update-MOZKRB2Z.js +0 -69
- /package/dist/bundle/{chunk-4ZSY3MKL.js → chunk-2H36DXV7.js} +0 -0
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
isCliFailure,
|
|
5
|
+
isStoreDamage
|
|
6
|
+
} from "./chunk-P5UTNYA7.js";
|
|
7
|
+
import {
|
|
8
|
+
refuseOwnerStoreInTests
|
|
9
|
+
} from "./chunk-RSBROHX4.js";
|
|
3
10
|
import {
|
|
4
11
|
RegistryError,
|
|
5
12
|
SNAKE_CASE,
|
|
@@ -44,6 +51,107 @@ import {
|
|
|
44
51
|
__name
|
|
45
52
|
} from "./chunk-ZVVMGPBJ.js";
|
|
46
53
|
|
|
54
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/store/marks.js
|
|
55
|
+
import { readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
56
|
+
var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
|
|
57
|
+
var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
|
|
58
|
+
var inodeOf = /* @__PURE__ */ __name((store) => statSync(store, { throwIfNoEntry: false })?.ino, "inodeOf");
|
|
59
|
+
var readJson = /* @__PURE__ */ __name((path) => {
|
|
60
|
+
try {
|
|
61
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
62
|
+
} catch (error) {
|
|
63
|
+
if (error.code === "ENOENT")
|
|
64
|
+
return null;
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
}, "readJson");
|
|
68
|
+
var ownerStoreInTests = /* @__PURE__ */ __name((store) => {
|
|
69
|
+
try {
|
|
70
|
+
refuseOwnerStoreInTests(store);
|
|
71
|
+
return false;
|
|
72
|
+
} catch {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
}, "ownerStoreInTests");
|
|
76
|
+
var sqliteFailure = /* @__PURE__ */ __name((error) => isCliFailure(error) && error.details?.reason === "store.damaged" ? error.cause : error, "sqliteFailure");
|
|
77
|
+
var markStoreDamaged = /* @__PURE__ */ __name((error, { store, command, version, runId, now = Date.now }) => {
|
|
78
|
+
const failure = sqliteFailure(error);
|
|
79
|
+
if (!isStoreDamage(failure) || ownerStoreInTests(store))
|
|
80
|
+
return false;
|
|
81
|
+
const inode = inodeOf(store);
|
|
82
|
+
if (inode === void 0)
|
|
83
|
+
return false;
|
|
84
|
+
const mark = {
|
|
85
|
+
at: new Date(now()).toISOString(),
|
|
86
|
+
command,
|
|
87
|
+
...version ? { cli_version: version } : {},
|
|
88
|
+
...runId ? { run_id: runId } : {},
|
|
89
|
+
error: failure.message.slice(0, 500),
|
|
90
|
+
inode
|
|
91
|
+
};
|
|
92
|
+
try {
|
|
93
|
+
writeFileSync(damageMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
94
|
+
`, { flag: "wx", mode: 384 });
|
|
95
|
+
return true;
|
|
96
|
+
} catch {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
}, "markStoreDamaged");
|
|
100
|
+
var readDamageMark = /* @__PURE__ */ __name((store) => {
|
|
101
|
+
const path = damageMarkPath(store);
|
|
102
|
+
let mark;
|
|
103
|
+
try {
|
|
104
|
+
mark = readJson(path);
|
|
105
|
+
} catch {
|
|
106
|
+
return { at: "unknown", command: "unknown", error: `${path} cannot be read`, inode: inodeOf(store) ?? 0 };
|
|
107
|
+
}
|
|
108
|
+
if (mark === null)
|
|
109
|
+
return null;
|
|
110
|
+
if (mark.inode !== inodeOf(store)) {
|
|
111
|
+
clearDamageMark(store);
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
return mark;
|
|
115
|
+
}, "readDamageMark");
|
|
116
|
+
var clearDamageMark = /* @__PURE__ */ __name((store) => rmSync(damageMarkPath(store), { force: true }), "clearDamageMark");
|
|
117
|
+
var refuseDamagedStore = /* @__PURE__ */ __name((store, cli) => {
|
|
118
|
+
const mark = readDamageMark(store);
|
|
119
|
+
if (!mark)
|
|
120
|
+
return;
|
|
121
|
+
throw new CliError("configuration_error", `the store was found damaged at ${mark.at} by \`${mark.command}\` (${mark.error}), so nothing writes to it until it is recovered; \`${cli ?? "<cli>"} store recover\` says what is damaged and what to do`, { reason: "store.damaged" });
|
|
122
|
+
}, "refuseDamagedStore");
|
|
123
|
+
var readHealthMark = /* @__PURE__ */ __name((store) => {
|
|
124
|
+
try {
|
|
125
|
+
return readJson(healthMarkPath(store));
|
|
126
|
+
} catch {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
}, "readHealthMark");
|
|
130
|
+
var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, schema, now = Date.now }) => {
|
|
131
|
+
const previous = readHealthMark(store);
|
|
132
|
+
if (ownerStoreInTests(store))
|
|
133
|
+
return { previous, cleared: null };
|
|
134
|
+
const checkedAt = new Date(now()).toISOString();
|
|
135
|
+
const mark = {
|
|
136
|
+
checked_at: checkedAt,
|
|
137
|
+
ok: health.ok,
|
|
138
|
+
problems: health.problems ?? 0,
|
|
139
|
+
schema,
|
|
140
|
+
cli,
|
|
141
|
+
...version ? { cli_version: version } : {},
|
|
142
|
+
last_ok_at: health.ok ? checkedAt : previous?.last_ok_at ?? null
|
|
143
|
+
};
|
|
144
|
+
const cleared = health.ok ? readDamageMark(store) : null;
|
|
145
|
+
try {
|
|
146
|
+
writeFileSync(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
147
|
+
`, { mode: 384 });
|
|
148
|
+
} catch {
|
|
149
|
+
}
|
|
150
|
+
if (cleared)
|
|
151
|
+
clearDamageMark(store);
|
|
152
|
+
return { previous, cleared };
|
|
153
|
+
}, "recordDeepCheck");
|
|
154
|
+
|
|
47
155
|
// node_modules/.pnpm/@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
|
|
48
156
|
var QUERY_LIMITS = {
|
|
49
157
|
bytes: 8192,
|
|
@@ -859,7 +967,7 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
|
|
|
859
967
|
}, "matches");
|
|
860
968
|
var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
|
|
861
969
|
|
|
862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
863
971
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
864
972
|
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
865
973
|
if (!Number.isSafeInteger(value) || value < minimum)
|
|
@@ -896,7 +1004,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text6) => {
|
|
|
896
1004
|
}, "parseMeetingReference");
|
|
897
1005
|
var canonicalMeetingReference = /* @__PURE__ */ __name((text6) => formatMeetingReference(parseMeetingReference(text6)), "canonicalMeetingReference");
|
|
898
1006
|
|
|
899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
900
1008
|
var text = string();
|
|
901
1009
|
var count = pipe(number(), integer(), minValue(0));
|
|
902
1010
|
var MEETING_ISSUES = ["time_without_zone"];
|
|
@@ -961,7 +1069,7 @@ var MEETING_QUERY = {
|
|
|
961
1069
|
})
|
|
962
1070
|
};
|
|
963
1071
|
|
|
964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
965
1073
|
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
966
1074
|
const parsed = urlOf(url);
|
|
967
1075
|
if (!parsed)
|
|
@@ -995,7 +1103,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
|
|
|
995
1103
|
}
|
|
996
1104
|
}, "urlOf");
|
|
997
1105
|
|
|
998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
999
1107
|
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
1000
1108
|
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
1001
1109
|
var htmlToText = /* @__PURE__ */ __name((html) => html.replace(/<\s*br\s*\/?>/giu, "\n").replace(/<\/\s*(p|div|li|tr|h[1-6])\s*>/giu, "\n").replace(/<a\s[^>]*href\s*=\s*"([^"]*)"[^>]*>/giu, " $1 ").replace(/<[^>]+>/gu, "").replace(/&(amp|lt|gt|quot|#39|apos|nbsp);/gu, (_, name) => ENTITIES[name] ?? ""), "htmlToText");
|
|
@@ -1028,7 +1136,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
|
1028
1136
|
return kept;
|
|
1029
1137
|
}, "entryMetadata");
|
|
1030
1138
|
|
|
1031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
1032
1140
|
import { createHash } from "node:crypto";
|
|
1033
1141
|
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
1034
1142
|
reference: cue2.reference,
|
|
@@ -1042,7 +1150,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
|
|
|
1042
1150
|
text: cue2.text
|
|
1043
1151
|
})).digest("hex"), "meetingCueFingerprint");
|
|
1044
1152
|
|
|
1045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
1046
1154
|
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
1047
1155
|
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
1048
1156
|
if (entry.recurrenceEndsAt !== null)
|
|
@@ -1065,7 +1173,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
|
1065
1173
|
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
1066
1174
|
}, "entryInWindow");
|
|
1067
1175
|
|
|
1068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
1069
1177
|
var text2 = string();
|
|
1070
1178
|
var count2 = pipe(number(), integer(), minValue(0));
|
|
1071
1179
|
var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
@@ -1300,7 +1408,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
1300
1408
|
};
|
|
1301
1409
|
}, "meetingHitsList");
|
|
1302
1410
|
|
|
1303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
1304
1412
|
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text6) => text6.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
1305
1413
|
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
1306
1414
|
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
@@ -1324,7 +1432,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
|
|
|
1324
1432
|
};
|
|
1325
1433
|
}, "validateMeetingParticipantSearch");
|
|
1326
1434
|
|
|
1327
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
1328
1436
|
var MeetingError = class extends CliError {
|
|
1329
1437
|
static {
|
|
1330
1438
|
__name(this, "MeetingError");
|
|
@@ -1456,7 +1564,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId)
|
|
|
1456
1564
|
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
1457
1565
|
}, "meetingSummaryAnswer");
|
|
1458
1566
|
|
|
1459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
1460
1568
|
var timestamp = /* @__PURE__ */ __name((milliseconds) => {
|
|
1461
1569
|
if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
|
|
1462
1570
|
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
@@ -1552,7 +1660,7 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
|
|
|
1552
1660
|
};
|
|
1553
1661
|
}, "exportMeeting");
|
|
1554
1662
|
|
|
1555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
1556
1664
|
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
1557
1665
|
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
1558
1666
|
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
@@ -1646,10 +1754,10 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
|
1646
1754
|
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
1647
1755
|
}, "paymentTitle");
|
|
1648
1756
|
|
|
1649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1650
1758
|
import { createHash as createHash2 } from "node:crypto";
|
|
1651
1759
|
|
|
1652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
1653
1761
|
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
1654
1762
|
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
1655
1763
|
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
|
|
@@ -1660,7 +1768,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
|
1660
1768
|
return new Date(value).toISOString();
|
|
1661
1769
|
}, "meetingTimestamp");
|
|
1662
1770
|
|
|
1663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1664
1772
|
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
1665
1773
|
var invalid3 = /* @__PURE__ */ __name((message) => {
|
|
1666
1774
|
throw new CliError("validation_error", message);
|
|
@@ -1833,7 +1941,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
|
1833
1941
|
var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
|
|
1834
1942
|
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
1835
1943
|
|
|
1836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
1837
1945
|
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
1838
1946
|
var cue = /* @__PURE__ */ __name((raw) => {
|
|
1839
1947
|
const reference2 = canonicalMeetingReference(raw);
|
|
@@ -1844,7 +1952,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
|
|
|
1844
1952
|
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
1845
1953
|
var meetingFindingFingerprint = findingFingerprint;
|
|
1846
1954
|
|
|
1847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
1848
1956
|
var text3 = string();
|
|
1849
1957
|
var identifier = pipe(text3, minLength(1));
|
|
1850
1958
|
var nullableText = nullable(text3);
|
|
@@ -1977,7 +2085,7 @@ var MEETING_RESULT_ENTITIES = {
|
|
|
1977
2085
|
meeting_repair: repair
|
|
1978
2086
|
};
|
|
1979
2087
|
|
|
1980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
1981
2089
|
var EVENT_QUERY = defineQuery({
|
|
1982
2090
|
entity: "event",
|
|
1983
2091
|
backend: "sql",
|
|
@@ -1993,7 +2101,7 @@ var EVENT_QUERY = defineQuery({
|
|
|
1993
2101
|
]
|
|
1994
2102
|
});
|
|
1995
2103
|
|
|
1996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
1997
2105
|
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
|
|
1998
2106
|
const current = await store.meeting(details.meeting.id);
|
|
1999
2107
|
if (!current)
|
|
@@ -2036,7 +2144,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
|
|
|
2036
2144
|
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
2037
2145
|
}, "linkEvent");
|
|
2038
2146
|
|
|
2039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
2040
2148
|
var context = {
|
|
2041
2149
|
command: "search meetings",
|
|
2042
2150
|
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
@@ -2156,7 +2264,7 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text6) => {
|
|
|
2156
2264
|
return { version: 1, language: "lucene-v1", root };
|
|
2157
2265
|
}, "meetingWordsQuery");
|
|
2158
2266
|
|
|
2159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
2160
2268
|
var LATIN_WORDS = {
|
|
2161
2269
|
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
2162
2270
|
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
@@ -2205,7 +2313,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
|
2205
2313
|
return null;
|
|
2206
2314
|
}, "transcriptLanguage");
|
|
2207
2315
|
|
|
2208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
2209
2317
|
var contentHash = /* @__PURE__ */ __name(async (text6) => {
|
|
2210
2318
|
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
|
|
2211
2319
|
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
@@ -2242,7 +2350,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
|
2242
2350
|
return time2;
|
|
2243
2351
|
}, "timestamp");
|
|
2244
2352
|
|
|
2245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
2246
2354
|
var TranscriptTextError = class extends Error {
|
|
2247
2355
|
static {
|
|
2248
2356
|
__name(this, "TranscriptTextError");
|
|
@@ -2297,7 +2405,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
2297
2405
|
return { header, lines };
|
|
2298
2406
|
}, "parseTranscriptText");
|
|
2299
2407
|
|
|
2300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
2301
2409
|
var VttError = class extends Error {
|
|
2302
2410
|
static {
|
|
2303
2411
|
__name(this, "VttError");
|
|
@@ -2349,7 +2457,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
|
2349
2457
|
return cues;
|
|
2350
2458
|
}, "parseVtt");
|
|
2351
2459
|
|
|
2352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
2353
2461
|
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
2354
2462
|
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
2355
2463
|
for (const file of files) {
|
|
@@ -2382,10 +2490,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
|
|
|
2382
2490
|
return report;
|
|
2383
2491
|
}, "importFiles");
|
|
2384
2492
|
|
|
2385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
2386
2494
|
var CHAT_MESSAGES_READ = 1e5;
|
|
2387
2495
|
|
|
2388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/provider.js
|
|
2389
2497
|
var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
|
|
2390
2498
|
const provider = scope2?.provider;
|
|
2391
2499
|
const account = scope2?.account;
|
|
@@ -2394,7 +2502,7 @@ var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
|
|
|
2394
2502
|
return Object.freeze({ provider, account });
|
|
2395
2503
|
}, "snapshotMeetingScope");
|
|
2396
2504
|
|
|
2397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
2398
2506
|
var nonempty = /* @__PURE__ */ __name((value, name) => {
|
|
2399
2507
|
if (typeof value !== "string" || !value.trim())
|
|
2400
2508
|
throw new CliError("validation_error", `${name} must be nonempty`);
|
|
@@ -2445,7 +2553,7 @@ var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
|
|
|
2445
2553
|
return Object.freeze(result);
|
|
2446
2554
|
}, "validateMeetingChange");
|
|
2447
2555
|
|
|
2448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
2449
2557
|
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
2450
2558
|
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
2451
2559
|
if (![before, after].every((value) => Number.isSafeInteger(value) && value >= 0) || before + after > 999 || !Number.isSafeInteger(bytes) || bytes < 2 || bytes > 4194304 || !Number.isSafeInteger(max_read_bytes) || max_read_bytes < 1 || max_read_bytes > 67108864 || expected_fingerprint !== void 0 && (typeof expected_fingerprint !== "string" || !/^[a-f0-9]{64}$/.test(expected_fingerprint)))
|
|
@@ -2458,7 +2566,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
|
2458
2566
|
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
2459
2567
|
}, "validateMeetingPassage");
|
|
2460
2568
|
|
|
2461
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
2462
2570
|
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
2463
2571
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2464
2572
|
throw new CliError("validation_error", "meeting preparation context is required");
|
|
@@ -2483,7 +2591,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
|
2483
2591
|
return { ...input, limit, maxReadBytes };
|
|
2484
2592
|
}, "validateMeetingPreparationContext");
|
|
2485
2593
|
|
|
2486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
2487
2595
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
2488
2596
|
var id = pipe(string(), minLength(1));
|
|
2489
2597
|
var meetingProjectEvidence = strictObject({
|
|
@@ -2604,7 +2712,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
|
|
|
2604
2712
|
};
|
|
2605
2713
|
}, "meetingProjectEvidenceAnswer");
|
|
2606
2714
|
|
|
2607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
2608
2716
|
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
2609
2717
|
const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
2610
2718
|
if (typeof query !== "string" || !query.trim() || query.includes("\0") || new TextEncoder().encode(query).byteLength > 65536 || !integer3(options.limit ?? 100, 1, 1e3) || !integer3(options.maxReadBytes ?? 4194304, 1, 67108864) || [
|
|
@@ -2624,7 +2732,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
|
2624
2732
|
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
2625
2733
|
}, "validateMeetingHitSearch");
|
|
2626
2734
|
|
|
2627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
2628
2736
|
var ids = {
|
|
2629
2737
|
meeting_id: "meetingId",
|
|
2630
2738
|
identity_id: "participantIdentityId",
|
|
@@ -2715,7 +2823,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project2, request =
|
|
|
2715
2823
|
return { project: project2.trim(), options, query: frozen.join(" AND ") };
|
|
2716
2824
|
}, "prepareMeetingProjectEvidence");
|
|
2717
2825
|
|
|
2718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
2719
2827
|
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, request = {}, now = Date.now()) => {
|
|
2720
2828
|
const prepared = prepareMeetingProjectEvidence(project2, request, now);
|
|
2721
2829
|
const page = await read(prepared.project, prepared.options);
|
|
@@ -2723,7 +2831,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, r
|
|
|
2723
2831
|
return meetingProjectEvidenceAnswer(page, prepared);
|
|
2724
2832
|
}, "readMeetingProjectEvidence");
|
|
2725
2833
|
|
|
2726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
2727
2835
|
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
2728
2836
|
const { identityExternalId, ...fields } = p;
|
|
2729
2837
|
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
@@ -2885,7 +2993,7 @@ unlinked`, format)],
|
|
|
2885
2993
|
return report;
|
|
2886
2994
|
}, "pull");
|
|
2887
2995
|
|
|
2888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
2889
2997
|
var text4 = string();
|
|
2890
2998
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
2891
2999
|
var id2 = pipe(number(), integer(), minValue(1));
|
|
@@ -3079,10 +3187,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
|
3079
3187
|
updated_at: new Date(one.updatedAt).toISOString()
|
|
3080
3188
|
}), "eventItem");
|
|
3081
3189
|
|
|
3082
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
3083
3191
|
var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
|
|
3084
3192
|
|
|
3085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
3086
3194
|
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
3087
3195
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
3088
3196
|
throw new CliError("validation_error", "related history request is required");
|
|
@@ -3112,14 +3220,14 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
3112
3220
|
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
3113
3221
|
}, "validateMeetingRelatedHistory");
|
|
3114
3222
|
|
|
3115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
3116
3224
|
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
3117
3225
|
|
|
3118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
3119
3227
|
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
3120
3228
|
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
3121
3229
|
|
|
3122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
3123
3231
|
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
3124
3232
|
input.signal?.throwIfAborted();
|
|
3125
3233
|
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
@@ -3140,7 +3248,7 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
|
3140
3248
|
return { ...input, limit, maxReadBytes };
|
|
3141
3249
|
}, "validateMeetingSeriesHistory");
|
|
3142
3250
|
|
|
3143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
3144
3252
|
var invalid4 = /* @__PURE__ */ __name((field) => {
|
|
3145
3253
|
throw new CliError("invalid_response", `meeting occurrence ${field} is invalid`);
|
|
3146
3254
|
}, "invalid");
|
|
@@ -3209,7 +3317,7 @@ var readOccurrenceSchedule = /* @__PURE__ */ __name((input, meetingId, limit, ma
|
|
|
3209
3317
|
return result;
|
|
3210
3318
|
}, "readOccurrenceSchedule");
|
|
3211
3319
|
|
|
3212
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
3213
3321
|
function invalid5(field, response = false) {
|
|
3214
3322
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
3215
3323
|
}
|
|
@@ -3238,7 +3346,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
|
3238
3346
|
cursorDetails(value);
|
|
3239
3347
|
}, "validateMeetingSeriesInventoryCursor");
|
|
3240
3348
|
|
|
3241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
3242
3350
|
var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
|
|
3243
3351
|
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
3244
3352
|
const zone = timeZone ?? "UTC";
|
|
@@ -3373,7 +3481,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
|
3373
3481
|
};
|
|
3374
3482
|
}, "aggregateMeetingStats");
|
|
3375
3483
|
|
|
3376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/meetings/upcoming.js
|
|
3377
3485
|
var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
3378
3486
|
if (!signal?.aborted)
|
|
3379
3487
|
return;
|
|
@@ -3443,7 +3551,177 @@ var createUpcomingMeetingReader = /* @__PURE__ */ __name((scope2, port) => {
|
|
|
3443
3551
|
};
|
|
3444
3552
|
}, "createUpcomingMeetingReader");
|
|
3445
3553
|
|
|
3446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
3555
|
+
var CURRENCY_SCALES = {
|
|
3556
|
+
AED: 2,
|
|
3557
|
+
AMD: 2,
|
|
3558
|
+
AUD: 2,
|
|
3559
|
+
BHD: 3,
|
|
3560
|
+
BYN: 2,
|
|
3561
|
+
CAD: 2,
|
|
3562
|
+
CHF: 2,
|
|
3563
|
+
CLP: 0,
|
|
3564
|
+
CNY: 2,
|
|
3565
|
+
CZK: 2,
|
|
3566
|
+
DKK: 2,
|
|
3567
|
+
EUR: 2,
|
|
3568
|
+
GBP: 2,
|
|
3569
|
+
GEL: 2,
|
|
3570
|
+
HUF: 2,
|
|
3571
|
+
ILS: 2,
|
|
3572
|
+
INR: 2,
|
|
3573
|
+
ISK: 0,
|
|
3574
|
+
JPY: 0,
|
|
3575
|
+
KGS: 2,
|
|
3576
|
+
KRW: 0,
|
|
3577
|
+
KWD: 3,
|
|
3578
|
+
KZT: 2,
|
|
3579
|
+
NOK: 2,
|
|
3580
|
+
PLN: 2,
|
|
3581
|
+
RSD: 2,
|
|
3582
|
+
RUB: 2,
|
|
3583
|
+
SEK: 2,
|
|
3584
|
+
THB: 2,
|
|
3585
|
+
TRY: 2,
|
|
3586
|
+
UAH: 2,
|
|
3587
|
+
USD: 2,
|
|
3588
|
+
UZS: 2,
|
|
3589
|
+
VND: 0
|
|
3590
|
+
};
|
|
3591
|
+
var refuse = /* @__PURE__ */ __name((message, reason) => {
|
|
3592
|
+
throw new CliError("validation_error", message, { reason });
|
|
3593
|
+
}, "refuse");
|
|
3594
|
+
var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
|
|
3595
|
+
var parseDecimal = /* @__PURE__ */ __name((text6, scale) => {
|
|
3596
|
+
const match = DECIMAL.exec(text6.trim());
|
|
3597
|
+
if (!match || (match[2] ?? "").length > scale)
|
|
3598
|
+
return void 0;
|
|
3599
|
+
return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
|
|
3600
|
+
}, "parseDecimal");
|
|
3601
|
+
var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
|
|
3602
|
+
const digits = BigInt(units).toString().padStart(scale + 1, "0");
|
|
3603
|
+
return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
|
|
3604
|
+
}, "formatDecimal");
|
|
3605
|
+
var groupDigits = /* @__PURE__ */ __name((decimal) => {
|
|
3606
|
+
const [whole = "0", fraction] = decimal.split(".");
|
|
3607
|
+
const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
3608
|
+
return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
|
|
3609
|
+
}, "groupDigits");
|
|
3610
|
+
var currencyOf = /* @__PURE__ */ __name((text6) => {
|
|
3611
|
+
const code = typeof text6 === "string" ? text6.trim().toUpperCase() : "";
|
|
3612
|
+
if (CURRENCY_SCALES[code] === void 0)
|
|
3613
|
+
return refuse(`${typeof text6 === "string" && text6.trim() ? text6.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
|
|
3614
|
+
return code;
|
|
3615
|
+
}, "currencyOf");
|
|
3616
|
+
var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
|
|
3617
|
+
var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
|
|
3618
|
+
const scale = scaleOf(currency);
|
|
3619
|
+
const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
|
|
3620
|
+
if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
|
|
3621
|
+
return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
|
|
3622
|
+
return Number(units);
|
|
3623
|
+
}, "minorUnits");
|
|
3624
|
+
var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
|
|
3625
|
+
amount: formatDecimal(units, scaleOf(currency)),
|
|
3626
|
+
currency
|
|
3627
|
+
}), "moneyOf");
|
|
3628
|
+
var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
|
|
3629
|
+
var QUANTITY_SCALE = 3;
|
|
3630
|
+
var quantityOf = /* @__PURE__ */ __name((text6) => {
|
|
3631
|
+
const thousandths = typeof text6 === "string" ? parseDecimal(text6, QUANTITY_SCALE) : void 0;
|
|
3632
|
+
if (thousandths === void 0 || thousandths === 0n)
|
|
3633
|
+
return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
|
|
3634
|
+
const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
|
|
3635
|
+
return { text: plain, thousandths };
|
|
3636
|
+
}, "quantityOf");
|
|
3637
|
+
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
3638
|
+
|
|
3639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
3640
|
+
var DEAL_KINDS = ["deal", "lead"];
|
|
3641
|
+
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
3642
|
+
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
3643
|
+
var DEAL_ROLES = ["owner", "contact", "decision-maker", "influencer"];
|
|
3644
|
+
var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
3645
|
+
const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
|
|
3646
|
+
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
3647
|
+
}, "dealLine");
|
|
3648
|
+
|
|
3649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/domain/relations.js
|
|
3650
|
+
var ORGANIZATION_ROLES = [
|
|
3651
|
+
"employee",
|
|
3652
|
+
"contractor",
|
|
3653
|
+
"founder",
|
|
3654
|
+
"owner",
|
|
3655
|
+
"manager",
|
|
3656
|
+
"adviser",
|
|
3657
|
+
"contact"
|
|
3658
|
+
];
|
|
3659
|
+
var PROJECT_ROLES = ["owner", "manager", "contributor", "client-contact", "approver"];
|
|
3660
|
+
var RELATIONS = {
|
|
3661
|
+
"member-of": {
|
|
3662
|
+
from: ["person", "organization", "project", "chat", "email_thread"],
|
|
3663
|
+
to: ["organization", "project"],
|
|
3664
|
+
roles: { to: { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES } }
|
|
3665
|
+
},
|
|
3666
|
+
"reports-to": { from: ["person"], to: ["person"], inverse: "manages" },
|
|
3667
|
+
"customer-of": { from: ["person", "organization"], to: ["organization"], inverse: "supplier of" },
|
|
3668
|
+
"partner-of": { from: ["organization"], to: ["organization"], symmetric: true },
|
|
3669
|
+
"related-to": {
|
|
3670
|
+
from: ["person", "organization", "project", "task", "deal", "lead"],
|
|
3671
|
+
to: ["person", "organization", "project", "task"],
|
|
3672
|
+
roles: { from: { deal: DEAL_ROLES, lead: DEAL_ROLES } }
|
|
3673
|
+
}
|
|
3674
|
+
};
|
|
3675
|
+
var RELATION_KINDS = Object.keys(RELATIONS);
|
|
3676
|
+
var specOf = /* @__PURE__ */ __name((kind) => Object.hasOwn(RELATIONS, kind) ? RELATIONS[kind] : void 0, "specOf");
|
|
3677
|
+
var isRelationKind = /* @__PURE__ */ __name((kind) => specOf(kind) !== void 0, "isRelationKind");
|
|
3678
|
+
var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
|
|
3679
|
+
var checkEnds = /* @__PURE__ */ __name((kind, from, to) => {
|
|
3680
|
+
const spec = specOf(kind);
|
|
3681
|
+
if (!spec)
|
|
3682
|
+
throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
|
|
3683
|
+
if (memberOnly(from) && (kind !== "member-of" || to !== "project"))
|
|
3684
|
+
throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
|
|
3685
|
+
if (!spec.from.includes(from) || !spec.to.includes(to))
|
|
3686
|
+
throw new CliError("validation_error", `${kind} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
|
|
3687
|
+
return spec;
|
|
3688
|
+
}, "checkEnds");
|
|
3689
|
+
var rolesOf = /* @__PURE__ */ __name((kind, from, to) => {
|
|
3690
|
+
const spec = specOf(kind);
|
|
3691
|
+
if (kind === "member-of" && from !== "person")
|
|
3692
|
+
return void 0;
|
|
3693
|
+
return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
|
|
3694
|
+
}, "rolesOf");
|
|
3695
|
+
var ROLE_LISTS = { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES, deal: DEAL_ROLES };
|
|
3696
|
+
var roleListOf = /* @__PURE__ */ __name((kind, from, to) => {
|
|
3697
|
+
const roles = rolesOf(kind, from, to);
|
|
3698
|
+
return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
|
|
3699
|
+
}, "roleListOf");
|
|
3700
|
+
var checkRole = /* @__PURE__ */ __name((kind, from, to, role, extra = []) => {
|
|
3701
|
+
const roles = rolesOf(kind, from, to)?.concat(extra);
|
|
3702
|
+
if (roles && !roles.includes(role))
|
|
3703
|
+
throw new CliError("validation_error", `a ${from}'s role on ${kind} ${to} is one of ${roles.join(", ")}`, {
|
|
3704
|
+
reason: "relationship.role-unknown"
|
|
3705
|
+
});
|
|
3706
|
+
return role;
|
|
3707
|
+
}, "checkRole");
|
|
3708
|
+
var isSymmetric = /* @__PURE__ */ __name((kind) => specOf(kind)?.symmetric === true, "isSymmetric");
|
|
3709
|
+
var inverseOf = /* @__PURE__ */ __name((kind) => specOf(kind)?.symmetric ? kind : specOf(kind)?.inverse ?? null, "inverseOf");
|
|
3710
|
+
var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
|
|
3711
|
+
var standingOf = /* @__PURE__ */ __name((link, now) => {
|
|
3712
|
+
if (link.endsAt != null && link.endsAt <= now)
|
|
3713
|
+
return "ended";
|
|
3714
|
+
if (link.confirmed)
|
|
3715
|
+
return "confirmed";
|
|
3716
|
+
if (link.deletedAt != null)
|
|
3717
|
+
return "ended";
|
|
3718
|
+
return link.accountId != null ? "reported" : "proposed";
|
|
3719
|
+
}, "standingOf");
|
|
3720
|
+
var isUsable = /* @__PURE__ */ __name((standing) => standing === "confirmed" || standing === "reported", "isUsable");
|
|
3721
|
+
var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
|
|
3722
|
+
var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
|
|
3723
|
+
|
|
3724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
3447
3725
|
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
3448
3726
|
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
3449
3727
|
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
@@ -3457,7 +3735,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
|
3457
3735
|
return tag;
|
|
3458
3736
|
}, "normalizeTag");
|
|
3459
3737
|
|
|
3460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3738
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
|
|
3461
3739
|
var LINK_KINDS = [
|
|
3462
3740
|
"links-to",
|
|
3463
3741
|
"blocked-by",
|
|
@@ -3470,15 +3748,17 @@ var LINK_KINDS = [
|
|
|
3470
3748
|
"created-from",
|
|
3471
3749
|
"duplicate-of",
|
|
3472
3750
|
"related-to",
|
|
3751
|
+
"reports-to",
|
|
3752
|
+
"customer-of",
|
|
3753
|
+
"partner-of",
|
|
3473
3754
|
"assigned-to",
|
|
3474
3755
|
"attached"
|
|
3475
3756
|
];
|
|
3476
3757
|
var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
|
|
3477
3758
|
var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
|
|
3478
|
-
var RELATION_KINDS = ["member-of", "related-to"];
|
|
3479
3759
|
var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
|
|
3480
3760
|
|
|
3481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/tasks/model.js
|
|
3482
3762
|
var TASK_KINDS = ["question", "request", "mention", "promise"];
|
|
3483
3763
|
var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
|
|
3484
3764
|
var CLOSED_STATES = ["done", "dismissed"];
|
|
@@ -3493,7 +3773,7 @@ function closeTask(task, state, by, at, reason) {
|
|
|
3493
3773
|
}
|
|
3494
3774
|
__name(closeTask, "closeTask");
|
|
3495
3775
|
|
|
3496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/tasks/priority.js
|
|
3497
3777
|
var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
|
|
3498
3778
|
var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
|
|
3499
3779
|
var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
|
|
@@ -3522,13 +3802,13 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
|
|
|
3522
3802
|
}, "priorityOf");
|
|
3523
3803
|
var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
|
|
3524
3804
|
|
|
3525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/tasks/store.js
|
|
3526
3806
|
function matches2(task, filter) {
|
|
3527
3807
|
return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
|
|
3528
3808
|
}
|
|
3529
3809
|
__name(matches2, "matches");
|
|
3530
3810
|
|
|
3531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/tasks/service.js
|
|
3532
3812
|
function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
|
|
3533
3813
|
async function find(id4) {
|
|
3534
3814
|
const task = await store.get(id4);
|
|
@@ -3588,7 +3868,7 @@ function median(values) {
|
|
|
3588
3868
|
}
|
|
3589
3869
|
__name(median, "median");
|
|
3590
3870
|
|
|
3591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3871
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
|
|
3592
3872
|
var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
|
|
3593
3873
|
var MEMORY_KINDS = ["summary", "digest", "preference"];
|
|
3594
3874
|
var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
|
|
@@ -3596,92 +3876,7 @@ var MEMORY_SCOPES = ["personal", "work"];
|
|
|
3596
3876
|
var WORK_TASK_TYPES = ["bug", "feature", "chore"];
|
|
3597
3877
|
var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
|
|
3598
3878
|
|
|
3599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3600
|
-
var CURRENCY_SCALES = {
|
|
3601
|
-
AED: 2,
|
|
3602
|
-
AMD: 2,
|
|
3603
|
-
AUD: 2,
|
|
3604
|
-
BHD: 3,
|
|
3605
|
-
BYN: 2,
|
|
3606
|
-
CAD: 2,
|
|
3607
|
-
CHF: 2,
|
|
3608
|
-
CLP: 0,
|
|
3609
|
-
CNY: 2,
|
|
3610
|
-
CZK: 2,
|
|
3611
|
-
DKK: 2,
|
|
3612
|
-
EUR: 2,
|
|
3613
|
-
GBP: 2,
|
|
3614
|
-
GEL: 2,
|
|
3615
|
-
HUF: 2,
|
|
3616
|
-
ILS: 2,
|
|
3617
|
-
INR: 2,
|
|
3618
|
-
ISK: 0,
|
|
3619
|
-
JPY: 0,
|
|
3620
|
-
KGS: 2,
|
|
3621
|
-
KRW: 0,
|
|
3622
|
-
KWD: 3,
|
|
3623
|
-
KZT: 2,
|
|
3624
|
-
NOK: 2,
|
|
3625
|
-
PLN: 2,
|
|
3626
|
-
RSD: 2,
|
|
3627
|
-
RUB: 2,
|
|
3628
|
-
SEK: 2,
|
|
3629
|
-
THB: 2,
|
|
3630
|
-
TRY: 2,
|
|
3631
|
-
UAH: 2,
|
|
3632
|
-
USD: 2,
|
|
3633
|
-
UZS: 2,
|
|
3634
|
-
VND: 0
|
|
3635
|
-
};
|
|
3636
|
-
var refuse = /* @__PURE__ */ __name((message, reason) => {
|
|
3637
|
-
throw new CliError("validation_error", message, { reason });
|
|
3638
|
-
}, "refuse");
|
|
3639
|
-
var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
|
|
3640
|
-
var parseDecimal = /* @__PURE__ */ __name((text6, scale) => {
|
|
3641
|
-
const match = DECIMAL.exec(text6.trim());
|
|
3642
|
-
if (!match || (match[2] ?? "").length > scale)
|
|
3643
|
-
return void 0;
|
|
3644
|
-
return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
|
|
3645
|
-
}, "parseDecimal");
|
|
3646
|
-
var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
|
|
3647
|
-
const digits = BigInt(units).toString().padStart(scale + 1, "0");
|
|
3648
|
-
return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
|
|
3649
|
-
}, "formatDecimal");
|
|
3650
|
-
var groupDigits = /* @__PURE__ */ __name((decimal) => {
|
|
3651
|
-
const [whole = "0", fraction] = decimal.split(".");
|
|
3652
|
-
const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
3653
|
-
return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
|
|
3654
|
-
}, "groupDigits");
|
|
3655
|
-
var currencyOf = /* @__PURE__ */ __name((text6) => {
|
|
3656
|
-
const code = typeof text6 === "string" ? text6.trim().toUpperCase() : "";
|
|
3657
|
-
if (CURRENCY_SCALES[code] === void 0)
|
|
3658
|
-
return refuse(`${typeof text6 === "string" && text6.trim() ? text6.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
|
|
3659
|
-
return code;
|
|
3660
|
-
}, "currencyOf");
|
|
3661
|
-
var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
|
|
3662
|
-
var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
|
|
3663
|
-
const scale = scaleOf(currency);
|
|
3664
|
-
const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
|
|
3665
|
-
if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
|
|
3666
|
-
return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
|
|
3667
|
-
return Number(units);
|
|
3668
|
-
}, "minorUnits");
|
|
3669
|
-
var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
|
|
3670
|
-
amount: formatDecimal(units, scaleOf(currency)),
|
|
3671
|
-
currency
|
|
3672
|
-
}), "moneyOf");
|
|
3673
|
-
var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
|
|
3674
|
-
var QUANTITY_SCALE = 3;
|
|
3675
|
-
var quantityOf = /* @__PURE__ */ __name((text6) => {
|
|
3676
|
-
const thousandths = typeof text6 === "string" ? parseDecimal(text6, QUANTITY_SCALE) : void 0;
|
|
3677
|
-
if (thousandths === void 0 || thousandths === 0n)
|
|
3678
|
-
return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
|
|
3679
|
-
const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
|
|
3680
|
-
return { text: plain, thousandths };
|
|
3681
|
-
}, "quantityOf");
|
|
3682
|
-
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
3683
|
-
|
|
3684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_d9de6622c75caef4cd0a02912b39a001/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
3879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
3685
3880
|
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
3686
3881
|
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
3687
3882
|
var MONEY_DIRECTIONS = ["in", "out"];
|
|
@@ -3710,7 +3905,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
|
3710
3905
|
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
3711
3906
|
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
3712
3907
|
|
|
3713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/domain/orders.js
|
|
3714
3909
|
var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
|
|
3715
3910
|
var ORDER_PURPOSES = ["personal", "business", "client", "other"];
|
|
3716
3911
|
var orderLine = /* @__PURE__ */ __name((order) => {
|
|
@@ -3720,7 +3915,7 @@ var orderLine = /* @__PURE__ */ __name((order) => {
|
|
|
3720
3915
|
}, "orderLine");
|
|
3721
3916
|
var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
|
|
3722
3917
|
|
|
3723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
3724
3919
|
var text5 = string();
|
|
3725
3920
|
var id3 = pipe(string(), minLength(1));
|
|
3726
3921
|
var time = isoTime;
|
|
@@ -3744,7 +3939,7 @@ var author = strictObject({
|
|
|
3744
3939
|
name: nullable(text5)
|
|
3745
3940
|
});
|
|
3746
3941
|
|
|
3747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
|
|
3748
3943
|
var organization = strictObject({
|
|
3749
3944
|
id: id3,
|
|
3750
3945
|
ref: reference,
|
|
@@ -3882,13 +4077,40 @@ export {
|
|
|
3882
4077
|
aggregateMeetingCounts,
|
|
3883
4078
|
aggregateMeetingStats,
|
|
3884
4079
|
createUpcomingMeetingReader,
|
|
4080
|
+
parseDecimal,
|
|
4081
|
+
formatDecimal,
|
|
4082
|
+
currencyOf,
|
|
4083
|
+
scaleOf,
|
|
4084
|
+
minorUnits,
|
|
4085
|
+
moneyOf,
|
|
4086
|
+
moneyLabel,
|
|
4087
|
+
quantityOf,
|
|
4088
|
+
lineUnits,
|
|
4089
|
+
DEAL_KINDS,
|
|
4090
|
+
DEAL_STATUSES,
|
|
4091
|
+
STAGE_OUTCOMES,
|
|
4092
|
+
DEAL_ROLES,
|
|
4093
|
+
dealLine,
|
|
4094
|
+
RELATION_KINDS,
|
|
4095
|
+
isRelationKind,
|
|
4096
|
+
checkEnds,
|
|
4097
|
+
rolesOf,
|
|
4098
|
+
ROLE_LISTS,
|
|
4099
|
+
roleListOf,
|
|
4100
|
+
checkRole,
|
|
4101
|
+
isSymmetric,
|
|
4102
|
+
inverseOf,
|
|
4103
|
+
STANDINGS,
|
|
4104
|
+
standingOf,
|
|
4105
|
+
isUsable,
|
|
4106
|
+
notOverriddenSql,
|
|
4107
|
+
usableLinkSql,
|
|
3885
4108
|
TAG_TYPES,
|
|
3886
4109
|
tagOf,
|
|
3887
4110
|
normalizeTag,
|
|
3888
4111
|
LINK_KINDS,
|
|
3889
4112
|
LINK_ORIGINS,
|
|
3890
4113
|
LINK_SOURCES,
|
|
3891
|
-
RELATION_KINDS,
|
|
3892
4114
|
linkKind,
|
|
3893
4115
|
TASK_KINDS,
|
|
3894
4116
|
TASK_STATES,
|
|
@@ -3910,15 +4132,6 @@ export {
|
|
|
3910
4132
|
MEMORY_SCOPES,
|
|
3911
4133
|
WORK_TASK_TYPES,
|
|
3912
4134
|
TASK_TYPES2 as TASK_TYPES,
|
|
3913
|
-
parseDecimal,
|
|
3914
|
-
formatDecimal,
|
|
3915
|
-
currencyOf,
|
|
3916
|
-
scaleOf,
|
|
3917
|
-
minorUnits,
|
|
3918
|
-
moneyOf,
|
|
3919
|
-
moneyLabel,
|
|
3920
|
-
quantityOf,
|
|
3921
|
-
lineUnits,
|
|
3922
4135
|
INVOICE_DIRECTIONS,
|
|
3923
4136
|
INVOICE_STATUSES,
|
|
3924
4137
|
MONEY_DIRECTIONS,
|
|
@@ -3943,5 +4156,10 @@ export {
|
|
|
3943
4156
|
author,
|
|
3944
4157
|
organization,
|
|
3945
4158
|
project,
|
|
3946
|
-
reminder
|
|
4159
|
+
reminder,
|
|
4160
|
+
markStoreDamaged,
|
|
4161
|
+
readDamageMark,
|
|
4162
|
+
refuseDamagedStore,
|
|
4163
|
+
readHealthMark,
|
|
4164
|
+
recordDeepCheck
|
|
3947
4165
|
};
|