@wirecat/zoom-cli 0.76.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -11
- package/contracts/wirecat.json +53 -105
- package/dist/answer-entities.d.ts +1 -141
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +0 -31
- package/dist/answer-entities.js.map +1 -1
- package/dist/api.d.ts +18 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +179 -54
- package/dist/api.js.map +1 -1
- package/dist/archive-commands.d.ts +0 -3
- package/dist/archive-commands.d.ts.map +1 -1
- package/dist/archive-commands.js +1 -54
- package/dist/archive-commands.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-AAMFP7IN.js → all-profiles-7JN3N3E6.js} +11 -11
- package/dist/bundle/answer-policy-G2BNMPEX.js +122 -0
- package/dist/bundle/{anthropic-6KIS53QB.js → anthropic-U6O7UYGZ.js} +6 -6
- package/dist/bundle/{app-server-6QYNNYEU.js → app-server-G7BTC6CE.js} +78 -68
- package/dist/bundle/{bun-QVVCH4MJ.js → bun-VLROVUFK.js} +2 -2
- package/dist/bundle/{bun-sqlite-Y2ZFMNQ3.js → bun-sqlite-C5JLANDE.js} +7 -7
- package/dist/bundle/{chunk-25GMFXPF.js → chunk-2AWWMROP.js} +3244 -3674
- package/dist/bundle/{chunk-YESHGC3M.js → chunk-2LMD3JUD.js} +2 -2
- package/dist/bundle/{chunk-LGBLYFKI.js → chunk-2O66KMOR.js} +6 -2
- package/dist/bundle/{chunk-JADBHKBP.js → chunk-2USGT7LE.js} +1 -1
- package/dist/bundle/{chunk-M7WYBGQT.js → chunk-3A3B3JX4.js} +8 -8
- package/dist/bundle/{chunk-RJK5ADMH.js → chunk-3NZJKY7A.js} +103 -42
- package/dist/bundle/chunk-3QWYRZME.js +773 -0
- package/dist/bundle/{chunk-D2TGXSHQ.js → chunk-4QCLPSJ7.js} +5 -5
- package/dist/bundle/{chunk-XC4V6YCS.js → chunk-4XPVRZXE.js} +1 -1
- package/dist/bundle/{chunk-EZJSAYWZ.js → chunk-532FNLON.js} +31 -87
- package/dist/bundle/{chunk-QLUU3BV2.js → chunk-53TV72JG.js} +6 -6
- package/dist/bundle/{chunk-VJANMYEC.js → chunk-5DLK4OXF.js} +3 -3
- package/dist/bundle/chunk-5SM2IOAS.js +389 -0
- package/dist/bundle/{chunk-65VRWNDP.js → chunk-6MFEWAK4.js} +4 -4
- package/dist/bundle/{chunk-IUSY4ZJK.js → chunk-6NTNAEZF.js} +2379 -2114
- package/dist/bundle/{chunk-DQHS336B.js → chunk-7AMKSXMB.js} +7 -6
- package/dist/bundle/{chunk-IXPBSDKB.js → chunk-7EVB4UV7.js} +4 -4
- package/dist/bundle/chunk-7HEZQCHL.js +555 -0
- package/dist/bundle/{chunk-TYAFL66K.js → chunk-7IIQU5RA.js} +15 -31
- package/dist/bundle/{chunk-TK77DCE5.js → chunk-7K5O2VWO.js} +1 -1
- package/dist/bundle/{chunk-VG63EXRC.js → chunk-AEVSVVTP.js} +2 -2
- package/dist/bundle/chunk-B4V4DRVO.js +229 -0
- package/dist/bundle/{chunk-2HKUQ7DR.js → chunk-B6TUEQ4O.js} +3 -3
- package/dist/bundle/chunk-BAHXR4PA.js +259 -0
- package/dist/bundle/{chunk-ZFYNJERV.js → chunk-BGO7IEHY.js} +6 -6
- package/dist/bundle/{chunk-PFLJJQWW.js → chunk-BIUHLXL2.js} +54 -55
- package/dist/bundle/{chunk-5T7TBK5Y.js → chunk-C26V2XNV.js} +1 -1
- package/dist/bundle/chunk-C56OYYFG.js +170 -0
- package/dist/bundle/{chunk-MDTEAKA5.js → chunk-DLJPN47R.js} +8 -6
- package/dist/bundle/{chunk-FBVJGJDM.js → chunk-EV7QCFQR.js} +27 -574
- package/dist/bundle/{chunk-ORM73DZO.js → chunk-F2KZNAFF.js} +2 -2
- package/dist/bundle/{chunk-QY6GE7CL.js → chunk-F7IDYQLM.js} +2 -2
- package/dist/bundle/{chunk-WNXC42IU.js → chunk-FCGRXUAU.js} +9 -9
- package/dist/bundle/{chunk-ELW3LMJZ.js → chunk-FHOQWPQ6.js} +397 -157
- package/dist/bundle/{chunk-NQ356ERO.js → chunk-FMMCGQNT.js} +77 -10
- package/dist/bundle/{chunk-K3K3WKDB.js → chunk-FNLXFQN6.js} +1 -1
- package/dist/bundle/{chunk-YGKM2ZWF.js → chunk-FURKMNC2.js} +3 -3
- package/dist/bundle/{chunk-XRH2NKW4.js → chunk-FXHZHQKU.js} +6 -6
- package/dist/bundle/{chunk-GZYICXO4.js → chunk-GQ6EJDMV.js} +1 -1
- package/dist/bundle/{chunk-VABYJQYE.js → chunk-H34KEXTN.js} +24 -22
- package/dist/bundle/{chunk-HWYSJ4SL.js → chunk-H74NENWA.js} +3 -3
- package/dist/bundle/{chunk-Y2BGABXP.js → chunk-H7SRM26V.js} +3 -3
- package/dist/bundle/{chunk-VRA4RVQU.js → chunk-HGBZBQAE.js} +3 -3
- package/dist/bundle/{chunk-EZXW3ZCR.js → chunk-HI4QICF7.js} +12 -12
- package/dist/bundle/{chunk-LEVOI6Z3.js → chunk-HOJOVUO6.js} +14 -13
- package/dist/bundle/{chunk-XWQKRKMT.js → chunk-HUSIS3XO.js} +71 -252
- package/dist/bundle/chunk-IBINGDYF.js +335 -0
- package/dist/bundle/{chunk-55SWKR6Y.js → chunk-INJK7FNM.js} +337 -597
- package/dist/bundle/{chunk-CXHUOPN5.js → chunk-JOIAE3NO.js} +7 -7
- package/dist/bundle/{chunk-OFODCJ2A.js → chunk-KBTINKQF.js} +3 -3
- package/dist/bundle/{chunk-VCFSUGPE.js → chunk-KEAKNNXU.js} +4 -4
- package/dist/bundle/{chunk-XHVFX74L.js → chunk-LBTANUUH.js} +2 -2
- package/dist/bundle/chunk-LBV4673S.js +72 -0
- package/dist/bundle/chunk-LERF2FIK.js +295 -0
- package/dist/bundle/{chunk-UYZDH5LK.js → chunk-LX532BXO.js} +1 -1
- package/dist/bundle/{chunk-IVFNHIU4.js → chunk-M2M3U4UU.js} +81 -5
- package/dist/bundle/{chunk-JWMOHEDL.js → chunk-M5R2DURM.js} +10 -10
- package/dist/bundle/{chunk-4ERYXY4Y.js → chunk-MJMHUU3J.js} +1 -1
- package/dist/bundle/{chunk-GYTAHH5Y.js → chunk-MSMFYW6N.js} +2 -2
- package/dist/bundle/{chunk-X73YEFQE.js → chunk-MVLLWSV7.js} +20 -118
- package/dist/bundle/{chunk-RXUVXAMM.js → chunk-NO2LIHWA.js} +1 -1
- package/dist/bundle/{chunk-Y4WEAWU7.js → chunk-NS5XSCHC.js} +1 -1
- package/dist/bundle/{chunk-ZETM63M6.js → chunk-OAE6XR7E.js} +9 -60
- package/dist/bundle/{chunk-CS62FET6.js → chunk-OAYAGQ7C.js} +22 -22
- package/dist/bundle/{chunk-T2QVWRJF.js → chunk-OI4563JI.js} +39 -67
- package/dist/bundle/{chunk-WKT5RPSY.js → chunk-OOLNK3Y5.js} +8 -8
- package/dist/bundle/{chunk-EBIK5Q73.js → chunk-ORSTSBWU.js} +1 -1
- package/dist/bundle/{chunk-GB5LI5RM.js → chunk-P5QO7Y3H.js} +6 -6
- package/dist/bundle/{chunk-3D5PETD2.js → chunk-PJMQE4PW.js} +29 -9
- package/dist/bundle/{chunk-KEFDP6NL.js → chunk-Q4AKIAIA.js} +12 -12
- package/dist/bundle/{chunk-CPOFLYPU.js → chunk-Q4CNLEAY.js} +29 -29
- package/dist/bundle/{chunk-UAV74EY4.js → chunk-RJIJR6KH.js} +1 -1
- package/dist/bundle/{chunk-GPIQY4YB.js → chunk-TEFHNXXX.js} +14 -14
- package/dist/bundle/{chunk-FMJ4QSSU.js → chunk-TFDD4Q5Z.js} +10 -10
- package/dist/bundle/{chunk-HUHH25AG.js → chunk-TXDCIM5D.js} +3017 -1599
- package/dist/bundle/{chunk-FGRFIXG2.js → chunk-U2Z35B3W.js} +2 -2
- package/dist/bundle/{chunk-WZJ7ZYR4.js → chunk-UHBQM54J.js} +4 -4
- package/dist/bundle/{chunk-6VCQ4CTK.js → chunk-UIBKGH5P.js} +1 -1
- package/dist/bundle/{chunk-5EII5RIL.js → chunk-UKYO3HNO.js} +1 -1
- package/dist/bundle/{chunk-7RORMNKP.js → chunk-V53TIJLY.js} +2 -2
- package/dist/bundle/{chunk-OOYIPK4F.js → chunk-VMA7SILL.js} +1 -1
- package/dist/bundle/chunk-VW36ZSAE.js +88 -0
- package/dist/bundle/chunk-WEAMGNST.js +31 -0
- package/dist/bundle/{chunk-EPPE6ZTS.js → chunk-WJTXO2EI.js} +1 -1
- package/dist/bundle/{chunk-4JPOELCT.js → chunk-WOYPWXZK.js} +4 -4
- package/dist/bundle/{chunk-OINDAHXC.js → chunk-XCOGI4JE.js} +4 -4
- package/dist/bundle/{chunk-CE5Y7PQU.js → chunk-XOG7B7K5.js} +4 -4
- package/dist/bundle/chunk-XSF5OBVZ.js +224 -0
- package/dist/bundle/{chunk-B7ZREOBD.js → chunk-XXD4YPHQ.js} +12 -12
- package/dist/bundle/{chunk-35AH33VJ.js → chunk-YAPDU3SV.js} +1 -1
- package/dist/bundle/{chunk-R47GYLNN.js → chunk-YHQ3TEGB.js} +29 -27
- package/dist/bundle/{chunk-LOEK6IFQ.js → chunk-YLNUKNGD.js} +87 -35
- package/dist/bundle/{chunk-6SXCGS3A.js → chunk-YNYQGZUW.js} +7 -7
- package/dist/bundle/{chunk-OWZETMRE.js → chunk-YZKVCTZI.js} +8 -8
- package/dist/bundle/{chunk-UG2QDGAH.js → chunk-ZCVO6GAT.js} +1 -1
- package/dist/bundle/{chunk-YEBWRWE3.js → chunk-ZDZASHSQ.js} +17 -17
- package/dist/bundle/chunk-ZZJ5IWNT.js +101 -0
- package/dist/bundle/{cli-FHMLYHUZ.js → cli-YALONJ4V.js} +135 -84
- package/dist/bundle/command-contract-DMR5EOIN.js +45 -0
- package/dist/bundle/{command-server-entry-YEZM52R5.js → command-server-entry-W4XTBUZE.js} +35 -31
- package/dist/bundle/config-4TLDRXRL.js +109 -0
- package/dist/bundle/{decode-SIYRMJOK.js → decode-IFQHVCFX.js} +16 -8
- package/dist/bundle/{dispatch-SMER3WDX.js → dispatch-GOJB4TDK.js} +9 -9
- package/dist/bundle/{dist-BSJETSFE.js → dist-H7XFUMRX.js} +25 -22
- package/dist/bundle/{echarts-UZJ6AREV.js → echarts-HPUHPJCO.js} +2 -2
- package/dist/bundle/{embed-A7DSHVI7.js → embed-ESU3WZYW.js} +7 -7
- package/dist/bundle/{embedder-WQBR4UGS.js → embedder-BV6O76B3.js} +10 -10
- package/dist/bundle/{failure-73UQXQTW.js → failure-SWVCYFQX.js} +3 -3
- package/dist/bundle/first-run-OEJGAQAE.js +29 -0
- package/dist/bundle/first-screen-QLM4IABL.js +45 -0
- package/dist/bundle/{folders-BH4SV6SI.js → folders-VQGKBM3P.js} +5 -5
- package/dist/bundle/{instructions-SDDUBGH4.js → instructions-UUX57I3V.js} +1 -1
- package/dist/bundle/{main-KL4FN5F3.js → main-UIKADOFB.js} +24 -24
- package/dist/bundle/{mcp-GN4FTJX5.js → mcp-VMS6PBCU.js} +2 -2
- package/dist/bundle/meeting-combined-SKJISCC7.js +26 -0
- package/dist/bundle/meeting-model-YG3Z5KCB.js +26 -0
- package/dist/bundle/meeting-semantic-F6GUICB7.js +23 -0
- package/dist/bundle/{meetings-URPXBHV7.js → meetings-KIBUPLPW.js} +37 -7
- package/dist/bundle/{node-ELCNUOCE.js → node-AM3JCAWB.js} +2 -2
- package/dist/bundle/{node-sqlite-QLSNHZBM.js → node-sqlite-VM6VS3RU.js} +8 -8
- package/dist/bundle/{oauth-LZ64S7Y3.js → oauth-AX5Z32H6.js} +8 -8
- package/dist/bundle/{open-WB4HUPQT.js → open-SSGOOOZG.js} +6 -6
- package/dist/bundle/openai-YIP73X2B.js +28 -0
- package/dist/bundle/{output-file-AHPQA5LR.js → output-file-FR226A64.js} +6 -6
- package/dist/bundle/{process-67DAKAAQ.js → process-5ZEK2VFY.js} +1 -1
- package/dist/bundle/{program-CIMACIBE.js → program-ROJAJHCB.js} +424 -251
- package/dist/bundle/{prompt-GG53UBDJ.js → prompt-6Y7A4453.js} +6 -6
- package/dist/bundle/{recognize-CFJ3CAEH.js → recognize-R5W25WKH.js} +5 -5
- package/dist/bundle/{remote-BLEM7C3Q.js → remote-PA4FQUZK.js} +11 -11
- package/dist/bundle/{rerank-ERN6PC66.js → rerank-CYX3UFTM.js} +8 -8
- package/dist/bundle/run-log-FHERL3H6.js +136 -0
- package/dist/bundle/{serve-FJPPTJXH.js → serve-MM5QEZJW.js} +15 -15
- package/dist/bundle/{server-FLUSDUGM.js → server-JQQAH7E5.js} +64 -54
- package/dist/bundle/server-W2BBONCQ.js +85 -0
- package/dist/bundle/{services-LXC6DVUQ.js → services-Y2DOQONM.js} +85 -54
- package/dist/bundle/{speech-WFEZTKXA.js → speech-O6WLX34V.js} +34 -18
- package/dist/bundle/{sqlite-runtime-KN33VSP7.js → sqlite-runtime-LQTBZMFH.js} +7 -7
- package/dist/bundle/{state-TXS4ZHIT.js → state-AIDPZLVH.js} +7 -7
- package/dist/bundle/{store-ZUREZYZB.js → store-BA4FQS5V.js} +26 -20
- package/dist/bundle/{store-MUOXLVL4.js → store-UNDS2TBG.js} +30 -22
- package/dist/bundle/store-connection-ADBJ36T4.js +102 -0
- package/dist/bundle/store-maintenance-command-IB6ML4UI.js +77 -0
- package/dist/bundle/{streaming-ZSCHRC5S.js → streaming-UFHT5MR2.js} +7 -7
- package/dist/bundle/{tokens-YVDOY4EV.js → tokens-Z32UKGQB.js} +10 -10
- package/dist/bundle/zm.js +9 -9
- package/dist/bundle/{zoom-app-O6GIMB7Y.js → zoom-app-6U46XBTG.js} +8 -8
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +3 -0
- package/dist/commands.js.map +1 -1
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +3 -5
- package/dist/first-screen.js.map +1 -1
- package/dist/meeting-integration-commands.d.ts.map +1 -1
- package/dist/meeting-integration-commands.js +46 -28
- package/dist/meeting-integration-commands.js.map +1 -1
- package/dist/meeting-source.d.ts.map +1 -1
- package/dist/meeting-source.js +15 -1
- package/dist/meeting-source.js.map +1 -1
- package/dist/permissions.d.ts +8 -4
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +25 -24
- package/dist/permissions.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +8 -5
- package/dist/program-bindings.js.map +1 -1
- package/dist/program.d.ts +2 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js.map +1 -1
- package/dist/remote-meetings.d.ts +38 -8
- package/dist/remote-meetings.d.ts.map +1 -1
- package/dist/remote-meetings.js +52 -29
- package/dist/remote-meetings.js.map +1 -1
- package/dist/run.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zoom-app.d.ts.map +1 -1
- package/dist/zoom-app.js +1 -0
- package/dist/zoom-app.js.map +1 -1
- package/package.json +5 -4
- package/skills/zoom-cli/SKILL.md +88 -236
- package/skills/zoom-cli/references/archive.md +59 -0
- package/skills/zoom-cli/references/people-and-projects.md +51 -0
- package/skills/zoom-cli/references/prepare.md +78 -0
- package/skills/zoom-cli/references/search.md +71 -0
- package/skills/zoom-cli/references/setup.md +31 -0
- package/skills/zoom-cli/references/zoom-live.md +27 -0
- package/dist/bundle/answer-policy-ETAELI4A.js +0 -110
- package/dist/bundle/chunk-64N7MY3I.js +0 -161
- package/dist/bundle/command-contract-HUZ4I23S.js +0 -41
- package/dist/bundle/config-KVTWN7QZ.js +0 -97
- package/dist/bundle/first-run-SY6XSUZ3.js +0 -29
- package/dist/bundle/first-screen-ZDMODGWS.js +0 -39
- package/dist/bundle/openai-KN6JE4QU.js +0 -28
- package/dist/bundle/run-log-S67YPJF6.js +0 -124
- package/dist/bundle/server-UNJY3TSJ.js +0 -74
- package/dist/bundle/store-connection-NRNEBUPU.js +0 -90
- package/dist/bundle/store-maintenance-command-OBOPYFZ5.js +0 -65
- /package/dist/bundle/{chunk-BDCC2J2Z.js → chunk-SHTHNBHG.js} +0 -0
|
@@ -3,18 +3,18 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
formatMeetingReference,
|
|
5
5
|
parseMeetingReference
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FHOQWPQ6.js";
|
|
7
7
|
import {
|
|
8
8
|
CliError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FNLXFQN6.js";
|
|
10
10
|
import {
|
|
11
11
|
singleLine
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WJTXO2EI.js";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
18
18
|
var CURRENCY_SCALES = {
|
|
19
19
|
AED: 2,
|
|
20
20
|
AMD: 2,
|
|
@@ -108,7 +108,7 @@ var quantityOf = /* @__PURE__ */ __name((text) => {
|
|
|
108
108
|
}, "quantityOf");
|
|
109
109
|
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
110
110
|
|
|
111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
112
112
|
var DEAL_KINDS = ["deal", "lead"];
|
|
113
113
|
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
114
114
|
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
@@ -118,7 +118,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
|
118
118
|
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
119
119
|
}, "dealLine");
|
|
120
120
|
|
|
121
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
122
122
|
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
123
123
|
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
124
124
|
var MONEY_DIRECTIONS = ["in", "out"];
|
|
@@ -147,7 +147,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
|
147
147
|
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
148
148
|
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
149
149
|
|
|
150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/orders.js
|
|
151
151
|
var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
|
|
152
152
|
var ORDER_PURPOSES = ["personal", "business", "client", "other"];
|
|
153
153
|
var orderLine = /* @__PURE__ */ __name((order) => {
|
|
@@ -158,7 +158,7 @@ var orderLine = /* @__PURE__ */ __name((order) => {
|
|
|
158
158
|
}, "orderLine");
|
|
159
159
|
var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
|
|
160
160
|
|
|
161
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/relations.js
|
|
162
162
|
var ORGANIZATION_ROLES = [
|
|
163
163
|
"employee",
|
|
164
164
|
"contractor",
|
|
@@ -265,7 +265,7 @@ var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'p
|
|
|
265
265
|
var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE ${KEYED} AND 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");
|
|
266
266
|
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");
|
|
267
267
|
|
|
268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/crm.js
|
|
269
269
|
var CRM_KINDS = ["organization", "person", "deal", "lead"];
|
|
270
270
|
var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
|
|
271
271
|
var isCrmUserId = /* @__PURE__ */ __name((id) => /^\d{1,20}$/.test(id), "isCrmUserId");
|
|
@@ -275,7 +275,7 @@ var normalCrmUserId = /* @__PURE__ */ __name((id) => {
|
|
|
275
275
|
}, "normalCrmUserId");
|
|
276
276
|
var isItemKind = /* @__PURE__ */ __name((kind2) => kind2 === "deal" || kind2 === "lead", "isItemKind");
|
|
277
277
|
|
|
278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/business.js
|
|
279
279
|
var CATALOG_KINDS = ["product", "service"];
|
|
280
280
|
var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
|
|
281
281
|
var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
|
|
@@ -304,21 +304,7 @@ var subscriptionLine = /* @__PURE__ */ __name((subscription) => `${subscription.
|
|
|
304
304
|
var walletLine = /* @__PURE__ */ __name((wallet) => `${wallet.name} \xB7 ${wallet.kind}, ${wallet.currency}${wallet.numberHint === null ? "" : `, \u2026${wallet.numberHint}`}` + notes(wallet.closed ? "closed" : null), "walletLine");
|
|
305
305
|
var transactionLine = /* @__PURE__ */ __name((transaction) => `${moneyLabel(transaction.amount, transaction.currency)} ${transaction.direction}${transaction.label === null ? "" : ` \xB7 ${transaction.label}`}, ${dayMonth(transaction.date)}` + notes(transaction.status === "pending" ? "pending" : null, pending(transaction.review)), "transactionLine");
|
|
306
306
|
|
|
307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
308
|
-
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
309
|
-
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
310
|
-
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
311
|
-
const tag = value.trim().toLowerCase();
|
|
312
|
-
return TAG.test(tag) ? tag : void 0;
|
|
313
|
-
}, "tagOf");
|
|
314
|
-
var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
315
|
-
const tag = tagOf(value);
|
|
316
|
-
if (tag === void 0)
|
|
317
|
-
throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
|
|
318
|
-
return tag;
|
|
319
|
-
}, "normalizeTag");
|
|
320
|
-
|
|
321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
322
308
|
var SCHEME = "msg:";
|
|
323
309
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
324
310
|
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -339,7 +325,7 @@ var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
|
339
325
|
return { provider, account, chat, message };
|
|
340
326
|
}, "parseLocator");
|
|
341
327
|
|
|
342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
328
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
343
329
|
var SIMPLE_REFERENCES = [
|
|
344
330
|
"note",
|
|
345
331
|
"document",
|
|
@@ -502,7 +488,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
|
502
488
|
return match !== null && byPrefix.has(match[1]);
|
|
503
489
|
}, "looksLikeReference");
|
|
504
490
|
|
|
505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
506
492
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
507
493
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
508
494
|
var CRM_OPENS = { deal: "deals show", lead: "leads show", pipeline: "pipelines show" };
|
|
@@ -519,7 +505,8 @@ var PROVIDERS = [
|
|
|
519
505
|
{ name: "obsidian", kind: "notes", aliases: [] },
|
|
520
506
|
{ name: "added", kind: "notes", aliases: [] },
|
|
521
507
|
{ name: "zoom", kind: "meetings", aliases: [] },
|
|
522
|
-
|
|
508
|
+
// Google Meet has no tool of its own: its meetings are gcal's, since every meeting is on the calendar.
|
|
509
|
+
{ name: "google-meet", kind: "meetings", aliases: [], command: "gcal" },
|
|
523
510
|
{ name: "google-drive", kind: "documents", aliases: [] },
|
|
524
511
|
// Its meetings come from the notes Telemost mails (`keeper@telemost.yandex.ru`), read by a mail rule.
|
|
525
512
|
{ name: "telemost", kind: "meetings", aliases: [] },
|
|
@@ -757,9 +744,6 @@ export {
|
|
|
757
744
|
subscriptionLine,
|
|
758
745
|
walletLine,
|
|
759
746
|
transactionLine,
|
|
760
|
-
TAG_TYPES,
|
|
761
|
-
tagOf,
|
|
762
|
-
normalizeTag,
|
|
763
747
|
formatLocator,
|
|
764
748
|
isLocator,
|
|
765
749
|
parseLocator,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/store/normalize.js
|
|
8
8
|
var NORMALIZER_VERSION = 1;
|
|
9
9
|
var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
|
|
10
10
|
var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
|
|
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
CliError,
|
|
5
5
|
errorCodes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FNLXFQN6.js";
|
|
7
7
|
import {
|
|
8
8
|
__name
|
|
9
9
|
} from "./chunk-ZVVMGPBJ.js";
|
|
10
10
|
|
|
11
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/errors/failures.js
|
|
12
12
|
var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
|
|
13
13
|
var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
14
14
|
const { code, exitCode } = value ?? {};
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
withTimeLimit
|
|
5
|
+
} from "./chunk-4XPVRZXE.js";
|
|
6
|
+
import {
|
|
7
|
+
EmptyAnswer,
|
|
8
|
+
checkedOptions,
|
|
9
|
+
messagesFor,
|
|
10
|
+
range,
|
|
11
|
+
systemFor,
|
|
12
|
+
validateImages
|
|
13
|
+
} from "./chunk-6MFEWAK4.js";
|
|
14
|
+
import {
|
|
15
|
+
refuseOffComputer
|
|
16
|
+
} from "./chunk-FCGRXUAU.js";
|
|
17
|
+
import {
|
|
18
|
+
envName
|
|
19
|
+
} from "./chunk-F7IDYQLM.js";
|
|
20
|
+
import {
|
|
21
|
+
PLAIN_HTTP_REFUSED,
|
|
22
|
+
endpoint,
|
|
23
|
+
endpointFetch,
|
|
24
|
+
modelAddressAllowed,
|
|
25
|
+
onThisComputer
|
|
26
|
+
} from "./chunk-FURKMNC2.js";
|
|
27
|
+
import {
|
|
28
|
+
Credentials,
|
|
29
|
+
pathsAreOverridden,
|
|
30
|
+
resolvePaths
|
|
31
|
+
} from "./chunk-OAYAGQ7C.js";
|
|
32
|
+
import {
|
|
33
|
+
array,
|
|
34
|
+
integer,
|
|
35
|
+
number,
|
|
36
|
+
optional,
|
|
37
|
+
picklist,
|
|
38
|
+
pipe,
|
|
39
|
+
strictObject,
|
|
40
|
+
string,
|
|
41
|
+
union
|
|
42
|
+
} from "./chunk-PJMQE4PW.js";
|
|
43
|
+
import {
|
|
44
|
+
CliError
|
|
45
|
+
} from "./chunk-FNLXFQN6.js";
|
|
46
|
+
import {
|
|
47
|
+
__name
|
|
48
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
49
|
+
|
|
50
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/models/openai.js
|
|
51
|
+
var options = strictObject({
|
|
52
|
+
temperature: range(0, 2),
|
|
53
|
+
top_p: range(0, 1),
|
|
54
|
+
presence_penalty: range(-2, 2),
|
|
55
|
+
frequency_penalty: range(-2, 2),
|
|
56
|
+
seed: optional(pipe(number(), integer())),
|
|
57
|
+
stop: optional(union([string(), array(string())])),
|
|
58
|
+
response_format: optional(strictObject({ type: picklist(["text", "json_object"]) }))
|
|
59
|
+
});
|
|
60
|
+
var openai = {
|
|
61
|
+
images: true,
|
|
62
|
+
baseUrl: "https://api.openai.com/v1",
|
|
63
|
+
validate: /* @__PURE__ */ __name((given) => checkedOptions("openai", options, given), "validate"),
|
|
64
|
+
complete: /* @__PURE__ */ __name((target, request, checked, apiKey, fetcher) => withTimeLimit(12e4, async (deadline) => {
|
|
65
|
+
const response = await fetcher(`${target.baseUrl.replace(/\/+$/, "")}/chat/completions`, {
|
|
66
|
+
method: "POST",
|
|
67
|
+
headers: { "Content-Type": "application/json", ...apiKey ? { Authorization: `Bearer ${apiKey}` } : {} },
|
|
68
|
+
body: JSON.stringify({
|
|
69
|
+
...checked,
|
|
70
|
+
model: target.model,
|
|
71
|
+
messages: [
|
|
72
|
+
{ role: "system", content: systemFor(request) },
|
|
73
|
+
...messagesFor(request),
|
|
74
|
+
...request.images === void 0 ? [] : [
|
|
75
|
+
{
|
|
76
|
+
role: "user",
|
|
77
|
+
content: [
|
|
78
|
+
{ type: "text", text: request.prompt },
|
|
79
|
+
...request.images.map((image) => ({
|
|
80
|
+
type: "image_url",
|
|
81
|
+
image_url: { url: `data:${image.mimeType};base64,${image.data}`, detail: "high" }
|
|
82
|
+
}))
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
],
|
|
87
|
+
...new URL(target.baseUrl).hostname === "api.openai.com" ? { max_completion_tokens: request.maxTokens } : { max_tokens: request.maxTokens }
|
|
88
|
+
}),
|
|
89
|
+
signal: deadline,
|
|
90
|
+
redirect: "error"
|
|
91
|
+
});
|
|
92
|
+
if (!response.ok)
|
|
93
|
+
throw new Error("provider rejected request");
|
|
94
|
+
const body = await response.json();
|
|
95
|
+
const choice = body.choices?.[0];
|
|
96
|
+
const content = choice?.message?.content;
|
|
97
|
+
const total = body.usage?.total_tokens;
|
|
98
|
+
const counted = Number.isInteger(total) && (total ?? 0) >= 1;
|
|
99
|
+
const local = onThisComputer(target.baseUrl);
|
|
100
|
+
const finish = choice?.finish_reason ?? null;
|
|
101
|
+
if (finish !== "stop" && !(local && finish === null))
|
|
102
|
+
throw new Error("incomplete response");
|
|
103
|
+
if (typeof content !== "string" || content.trim() === "")
|
|
104
|
+
throw new EmptyAnswer();
|
|
105
|
+
if (!counted && !local)
|
|
106
|
+
throw new Error("incomplete response");
|
|
107
|
+
const { prompt_tokens: input, completion_tokens: output } = body.usage ?? {};
|
|
108
|
+
return {
|
|
109
|
+
text: content,
|
|
110
|
+
// No count from a server on this computer costs nothing; a rough one keeps the gateway's check meaningful.
|
|
111
|
+
tokens: counted ? total : Math.max(1, Math.ceil(content.length / 4)),
|
|
112
|
+
...Number.isInteger(input) && Number.isInteger(output) ? { usage: { input, output } } : {}
|
|
113
|
+
};
|
|
114
|
+
}), "complete")
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/models/index.js
|
|
118
|
+
var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
119
|
+
complete: /* @__PURE__ */ __name(async (request) => {
|
|
120
|
+
if (deps.signal?.aborted)
|
|
121
|
+
throw new CliError("cancelled", "model request cancelled");
|
|
122
|
+
const target = deps.resolve(request.purpose);
|
|
123
|
+
if (!target || target.provider === "off")
|
|
124
|
+
throw new CliError("configuration_error", `models.${request.purpose}.provider is not configured; no model was called`);
|
|
125
|
+
if (!request.purpose || !Number.isSafeInteger(request.maxTokens) || request.maxTokens < 1 || typeof request.prompt !== "string")
|
|
126
|
+
throw new CliError("validation_error", "a model request needs a purpose, prompt and positive whole maxTokens");
|
|
127
|
+
validateImages(request.images);
|
|
128
|
+
let adapter = deps.adapters?.[target.provider];
|
|
129
|
+
if (!adapter && target.provider === "openai")
|
|
130
|
+
adapter = openai;
|
|
131
|
+
if (!adapter && target.provider === "anthropic")
|
|
132
|
+
adapter = (await import("./anthropic-U6O7UYGZ.js")).anthropic;
|
|
133
|
+
if (!adapter)
|
|
134
|
+
throw new CliError("validation_error", `no model adapter for ${target.provider}`);
|
|
135
|
+
if (request.images !== void 0 && adapter.images !== true)
|
|
136
|
+
throw new CliError("validation_error", "the model adapter does not support image inputs");
|
|
137
|
+
const options2 = adapter.validate(request.options ?? {});
|
|
138
|
+
const baseUrl = target.baseUrl ?? adapter.baseUrl;
|
|
139
|
+
if (!target.model.trim() || !endpoint(baseUrl))
|
|
140
|
+
throw new CliError("validation_error", "a model target needs a model and an HTTP/S endpoint without credentials, query or fragment");
|
|
141
|
+
if (!modelAddressAllowed(baseUrl))
|
|
142
|
+
throw new CliError("validation_error", `${PLAIN_HTTP_REFUSED}; no data was sent`, {
|
|
143
|
+
reason: "model.address-refused"
|
|
144
|
+
});
|
|
145
|
+
refuseOffComputer(deps.env ?? process.env, baseUrl, `${request.purpose} data`);
|
|
146
|
+
if (!await deps.consent(request, { ...target, baseUrl }))
|
|
147
|
+
throw new CliError("permission_error", `model consent for ${request.purpose} is missing; no data was sent`);
|
|
148
|
+
const apiKey = await deps.key?.(target.provider, target);
|
|
149
|
+
if (deps.signal?.aborted)
|
|
150
|
+
throw new CliError("cancelled", "model request cancelled");
|
|
151
|
+
const fetcher = deps.fetch ?? endpointFetch(baseUrl, 12e4);
|
|
152
|
+
let limited = false;
|
|
153
|
+
let unreachable = false;
|
|
154
|
+
let refused = false;
|
|
155
|
+
let status;
|
|
156
|
+
const cancellable = /* @__PURE__ */ __name(async (input, init) => {
|
|
157
|
+
const signal = init?.signal ?? (input instanceof Request ? input.signal : void 0);
|
|
158
|
+
let response;
|
|
159
|
+
try {
|
|
160
|
+
response = await fetcher(input, {
|
|
161
|
+
...init,
|
|
162
|
+
signal: deps.signal ? AbortSignal.any([deps.signal, ...signal ? [signal] : []]) : signal
|
|
163
|
+
});
|
|
164
|
+
} catch (error) {
|
|
165
|
+
unreachable = true;
|
|
166
|
+
throw error;
|
|
167
|
+
}
|
|
168
|
+
if (!response.ok)
|
|
169
|
+
status = response.status;
|
|
170
|
+
if (response.status === 429)
|
|
171
|
+
limited = true;
|
|
172
|
+
if (response.status === 401 || response.status === 403)
|
|
173
|
+
refused = true;
|
|
174
|
+
return response;
|
|
175
|
+
}, "cancellable");
|
|
176
|
+
try {
|
|
177
|
+
const answer = await adapter.complete({ ...target, baseUrl }, request, options2, apiKey, cancellable);
|
|
178
|
+
if (deps.signal?.aborted)
|
|
179
|
+
throw new Error("cancelled");
|
|
180
|
+
if (typeof answer.text !== "string" || !Number.isSafeInteger(answer.tokens) || answer.tokens < 1)
|
|
181
|
+
throw new Error("incomplete");
|
|
182
|
+
return { ...answer, provider: target.provider, model: target.model };
|
|
183
|
+
} catch (error) {
|
|
184
|
+
if (limited)
|
|
185
|
+
throw new CliError("rate_limited", `${request.purpose} provider rate limit reached; no result was stored`);
|
|
186
|
+
const reason = refused ? "model.key-rejected" : unreachable && !deps.signal?.aborted ? "model.unreachable" : error instanceof EmptyAnswer ? "model.empty-answer" : void 0;
|
|
187
|
+
throw new CliError("invalid_response", `${request.purpose} provider failed or returned an incomplete response; no result was stored`, reason === void 0 && status === void 0 ? void 0 : { ...reason === void 0 ? {} : { reason }, ...status === void 0 ? {} : { status } });
|
|
188
|
+
}
|
|
189
|
+
}, "complete")
|
|
190
|
+
}), "modelGateway");
|
|
191
|
+
|
|
192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
|
|
193
|
+
var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
|
|
194
|
+
const host = new URL(baseUrl).host;
|
|
195
|
+
return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
|
|
196
|
+
}, "endpointKeyName");
|
|
197
|
+
var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) => {
|
|
198
|
+
const where = { appName: app.appName, prefix: app.envPrefix, env };
|
|
199
|
+
const credentials = /* @__PURE__ */ __name((provider) => new Credentials({
|
|
200
|
+
configDir: resolvePaths(where).config,
|
|
201
|
+
service: app.appName,
|
|
202
|
+
...["openai", "anthropic"].includes(provider) ? { envVar: envName(app, `${provider.toUpperCase()}_API_KEY`) } : {},
|
|
203
|
+
isolated: pathsAreOverridden(where),
|
|
204
|
+
env,
|
|
205
|
+
...keyring ? { keyring } : {},
|
|
206
|
+
warn: /* @__PURE__ */ __name((message) => process.stderr.write(`${message}
|
|
207
|
+
`), "warn")
|
|
208
|
+
}), "credentials");
|
|
209
|
+
const account = /* @__PURE__ */ __name((provider) => `embeddings:${provider}`, "account");
|
|
210
|
+
return {
|
|
211
|
+
read: /* @__PURE__ */ __name((provider) => {
|
|
212
|
+
const stored = credentials(provider).read(account(provider));
|
|
213
|
+
if (stored)
|
|
214
|
+
return { key: stored.secret, source: stored.source };
|
|
215
|
+
const shared = ["openai", "anthropic"].includes(provider) ? env[`${provider.toUpperCase()}_API_KEY`]?.trim() : void 0;
|
|
216
|
+
return shared ? { key: shared, source: "env" } : void 0;
|
|
217
|
+
}, "read"),
|
|
218
|
+
/** A key kept under the provider's own name, as an owner may have stored it by hand for the whole tool. */
|
|
219
|
+
readPlain: /* @__PURE__ */ __name((provider) => credentials(provider).read(provider)?.secret, "readPlain"),
|
|
220
|
+
write: /* @__PURE__ */ __name((provider, key) => credentials(provider).write(account(provider), key, { signIn: true }), "write"),
|
|
221
|
+
remove: /* @__PURE__ */ __name((provider) => credentials(provider).remove(account(provider)), "remove")
|
|
222
|
+
};
|
|
223
|
+
}, "embeddingKeys");
|
|
224
|
+
|
|
225
|
+
export {
|
|
226
|
+
modelGateway,
|
|
227
|
+
endpointKeyName,
|
|
228
|
+
embeddingKeys
|
|
229
|
+
};
|
|
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
alive
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZCVO6GAT.js";
|
|
6
6
|
import {
|
|
7
7
|
resolvePaths,
|
|
8
8
|
writeSecurely
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OAYAGQ7C.js";
|
|
10
10
|
import {
|
|
11
11
|
__name
|
|
12
12
|
} from "./chunk-ZVVMGPBJ.js";
|
|
13
13
|
|
|
14
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/background/lock.js
|
|
15
15
|
import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { dirname, join } from "node:path";
|
|
17
17
|
var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");
|