@wirecat/mail-cli 0.23.1 → 0.25.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/CHANGELOG.md +23 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-FJHJCGRU.js → all-profiles-QEV2PSOR.js} +11 -11
- package/dist/bundle/{anthropic-AFL7NKVZ.js → anthropic-5NKQXIHM.js} +28 -12
- package/dist/bundle/{app-server-WKCBJMHI.js → app-server-G2CJNT4R.js} +62 -50
- package/dist/bundle/{bun-HQATAQJQ.js → bun-6HBYWQIX.js} +2 -2
- package/dist/bundle/{bun-sqlite-4ECAV7OU.js → bun-sqlite-DXIQ7BVR.js} +9 -5
- package/dist/bundle/{chunk-MUDHCYN4.js → chunk-37F6QYTO.js} +6 -6
- package/dist/bundle/{chunk-NMGF3UOZ.js → chunk-3XVR2ROR.js} +50 -46
- package/dist/bundle/{chunk-QUKD5SO2.js → chunk-434YOD6A.js} +4 -4
- package/dist/bundle/{chunk-7SWWVDEZ.js → chunk-4W4EVVL4.js} +61 -21
- package/dist/bundle/{chunk-CCYHBNRL.js → chunk-5QYK3LWS.js} +326 -56
- package/dist/bundle/{chunk-7YRKUEYE.js → chunk-5ZYFV6FD.js} +694 -228
- package/dist/bundle/chunk-7GLJSJ7M.js +16 -0
- package/dist/bundle/{chunk-NOA6E6MM.js → chunk-A6BPOX5O.js} +38841 -24161
- package/dist/bundle/{chunk-34743C4C.js → chunk-ADKMBXY4.js} +1 -1
- package/dist/bundle/{chunk-2HXHAFRP.js → chunk-B7SWTH5O.js} +2 -2
- package/dist/bundle/{chunk-NKBAZ4VC.js → chunk-BC7PFQL7.js} +2 -2
- package/dist/bundle/{chunk-ROKTS7WM.js → chunk-CBYBZCQP.js} +1 -1
- package/dist/bundle/chunk-CIWWNBVW.js +188 -0
- package/dist/bundle/{chunk-SBGXKM4U.js → chunk-DIA56CS7.js} +8 -7
- package/dist/bundle/{chunk-VYHIX3OP.js → chunk-EXVY76VO.js} +61 -607
- package/dist/bundle/{chunk-BVJQBAGL.js → chunk-FZZD4AFY.js} +14 -14
- package/dist/bundle/{chunk-VFKX5UMJ.js → chunk-G5LHHAW2.js} +6 -6
- package/dist/bundle/{chunk-QV3M2MHG.js → chunk-GJRYZXBN.js} +13 -136
- package/dist/bundle/{chunk-GJNFNC76.js → chunk-GY4XCLCO.js} +10 -15
- package/dist/bundle/{chunk-V7CFZ773.js → chunk-HEIDAHRC.js} +2 -2
- package/dist/bundle/{chunk-AGNAT7CM.js → chunk-HEYVMAAQ.js} +2 -2
- package/dist/bundle/{chunk-HOKGIYUO.js → chunk-HJSJBNCJ.js} +119 -9
- package/dist/bundle/{chunk-KKGX7JMX.js → chunk-HLXVUMZJ.js} +2 -2
- package/dist/bundle/{chunk-OU5CWCG2.js → chunk-IACWKZWS.js} +1 -1
- package/dist/bundle/{chunk-QR7JZM3D.js → chunk-IXO4SCKE.js} +1 -1
- package/dist/bundle/{chunk-GOMJNH56.js → chunk-IZOYW4Z4.js} +32 -8
- package/dist/bundle/{chunk-WN4HP7IZ.js → chunk-J4OYK4WL.js} +14 -14
- package/dist/bundle/{chunk-76RTQYJQ.js → chunk-JG4MNYG2.js} +1 -1
- package/dist/bundle/{chunk-VAMCRP47.js → chunk-K2OGF7KC.js} +2 -2
- package/dist/bundle/chunk-K6HR6HCO.js +32 -0
- package/dist/bundle/{chunk-B6QMMRIM.js → chunk-KFB2X6KE.js} +1530 -1525
- package/dist/bundle/{chunk-3UFD76IR.js → chunk-KK4HD3SI.js} +6 -6
- package/dist/bundle/{chunk-3QVGB2CI.js → chunk-L4QVOEOB.js} +4 -4
- package/dist/bundle/chunk-LGZPKKBN.js +53 -0
- package/dist/bundle/chunk-LVGX7VTD.js +138 -0
- package/dist/bundle/chunk-MBFPFWCO.js +1243 -0
- package/dist/bundle/{chunk-3DQYO7FB.js → chunk-MCPOZNWG.js} +1 -1
- package/dist/bundle/{chunk-SR3ADLGX.js → chunk-MWGH3M46.js} +3 -3
- package/dist/bundle/{chunk-OJCUSHZG.js → chunk-ND5H5ADM.js} +4 -4
- package/dist/bundle/chunk-NMZQTYKJ.js +18 -0
- package/dist/bundle/{chunk-4YJJQNNJ.js → chunk-OLKCJBZY.js} +5 -5
- package/dist/bundle/{chunk-E7ZVKQHG.js → chunk-OLLIWNFG.js} +3 -3
- package/dist/bundle/{chunk-R5MYOLQP.js → chunk-P6GXNT7Z.js} +13 -13
- package/dist/bundle/{chunk-M7RGG3UU.js → chunk-PGC5TRH6.js} +3 -3
- package/dist/bundle/{chunk-3OZKDC6Y.js → chunk-PHHH2NQP.js} +15 -9
- package/dist/bundle/{chunk-S5OTP7XS.js → chunk-PP3YOAWG.js} +3 -3
- package/dist/bundle/{chunk-4IFX4HV2.js → chunk-PQMJ5BXH.js} +4 -4
- package/dist/bundle/{chunk-ZXIPJF3Y.js → chunk-QB3DP2TN.js} +2 -2
- package/dist/bundle/{chunk-4IWJARFA.js → chunk-QQUY4MZY.js} +1 -1
- package/dist/bundle/{chunk-UHC5I3JV.js → chunk-RX5CJ55S.js} +1 -1
- package/dist/bundle/{chunk-CYQVWITQ.js → chunk-S2QRAKQI.js} +99 -42
- package/dist/bundle/{chunk-V3TDQUXD.js → chunk-SMTBV62X.js} +44 -60
- package/dist/bundle/{chunk-SNTLN2QT.js → chunk-T27IMG6X.js} +3 -1
- package/dist/bundle/{chunk-LLYVBO3R.js → chunk-TY644DKQ.js} +19 -19
- package/dist/bundle/{chunk-R554W7ZO.js → chunk-U6IQ6YQ2.js} +2 -2
- package/dist/bundle/{chunk-MBKNL5TX.js → chunk-VFU7PVPQ.js} +373 -133
- package/dist/bundle/{chunk-UMXVQIGD.js → chunk-VL6H2BND.js} +377 -12
- package/dist/bundle/{chunk-DALBYUPC.js → chunk-VUBZFMGP.js} +2 -2
- package/dist/bundle/{chunk-VYIIX6VN.js → chunk-WOAYHCM2.js} +1 -1
- package/dist/bundle/{chunk-LQDMUMA2.js → chunk-WX6OYVCH.js} +5370 -3700
- package/dist/bundle/chunk-XMDEM6BZ.js +2094 -0
- package/dist/bundle/{chunk-CUOCDJFI.js → chunk-XQYKIZMG.js} +13 -9
- package/dist/bundle/{chunk-PMIKRELC.js → chunk-YNS2YVUR.js} +69 -6
- package/dist/bundle/{chunk-CBWA2T3N.js → chunk-Z5T6OW3V.js} +14 -5
- package/dist/bundle/command-contract-XSW2Q33S.js +36 -0
- package/dist/bundle/command-server-entry-XMSSY5ID.js +165 -0
- package/dist/bundle/{decode-QXKTMOTH.js → decode-RYGB4PGT.js} +5 -5
- package/dist/bundle/{dispatch-G4CYFWQ2.js → dispatch-PLQOIZG5.js} +10 -10
- package/dist/bundle/{dist-5FX36DAW.js → dist-GY2AQETI.js} +79 -46
- package/dist/bundle/{echarts-HHUM43TU.js → echarts-7CM2MCMW.js} +2 -2
- package/dist/bundle/{embed-SRZSDZVI.js → embed-FTBDPOPT.js} +6 -6
- package/dist/bundle/{embedder-WZIZCWLX.js → embedder-B43WGNBD.js} +9 -9
- package/dist/bundle/{failure-FFPK2WYB.js → failure-XP5QYV2T.js} +2 -2
- package/dist/bundle/{first-run-6DVWZ3JQ.js → first-run-XIIUARNM.js} +12 -11
- package/dist/bundle/first-screen-Z7HC6PQU.js +34 -0
- package/dist/bundle/{instructions-UWONE6UT.js → instructions-R7OHVAWH.js} +1 -1
- package/dist/bundle/mail.js +37 -13
- package/dist/bundle/{mcp-CFVG2OUS.js → mcp-7KQUJNFN.js} +2 -2
- package/dist/bundle/{node-HLAOYJDB.js → node-3N2JGZ7V.js} +2 -2
- package/dist/bundle/{node-sqlite-RO66I7W6.js → node-sqlite-WFJXW3CZ.js} +10 -6
- package/dist/bundle/{oauth-VNLB2TET.js → oauth-SVJLQTWV.js} +7 -7
- package/dist/bundle/{open-QQSG343L.js → open-ZDONVKSX.js} +5 -5
- package/dist/bundle/{openai-JTFC7OGF.js → openai-XVEW6XOU.js} +21 -38
- package/dist/bundle/{process-3CZAXR6P.js → process-YAHHUFR5.js} +1 -1
- package/dist/bundle/{program-XTOS4RAM.js → program-HU2UVMJE.js} +7071 -5421
- package/dist/bundle/{prompt-HGQ6GPYL.js → prompt-JAJ2CUJI.js} +5 -5
- package/dist/bundle/{recognize-2SHMNEIZ.js → recognize-UFBWUNFR.js} +4 -4
- package/dist/bundle/{remote-GBQC3433.js → remote-2GFOVLCR.js} +9 -7
- package/dist/bundle/{rerank-FQHQXFNR.js → rerank-BGPSMXTL.js} +7 -7
- package/dist/bundle/{serve-THU67QUZ.js → serve-CB3XJTH3.js} +9 -9
- package/dist/bundle/server-34GEF22R.js +68 -0
- package/dist/bundle/{server-LOT3CLYX.js → server-M7FQY7TX.js} +42 -40
- package/dist/bundle/{sqlite-runtime-NOOUMBC4.js → sqlite-runtime-AEV6PGDR.js} +6 -6
- package/dist/bundle/{state-KSKZCV2U.js → state-YLBEQLBI.js} +6 -6
- package/dist/bundle/{store-BAKSHTKF.js → store-CDUL3HKK.js} +19 -16
- package/dist/bundle/{store-OHNZOQ7U.js → store-EKWKY6GG.js} +49 -20
- package/dist/bundle/store-maintenance-command-XH2JUM5F.js +58 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-5UKBUI4I.js +0 -35
- package/dist/bundle/chunk-EXPR6QAX.js +0 -394
- package/dist/bundle/chunk-FWFNUJQD.js +0 -12172
- package/dist/bundle/command-contract-IIHBNF7J.js +0 -35
- package/dist/bundle/first-screen-SRZ7NYHZ.js +0 -33
- package/dist/bundle/server-VKMUX7ZT.js +0 -65
- package/dist/bundle/store-maintenance-command-ROQHJVEA.js +0 -54
- /package/dist/bundle/{chunk-QZLK2ISN.js → chunk-YVNHQFLC.js} +0 -0
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
QUERY_REASONS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5ZYFV6FD.js";
|
|
6
6
|
import {
|
|
7
7
|
defineReasons
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IZOYW4Z4.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/errors/reasons.js
|
|
14
14
|
var validation = /* @__PURE__ */ __name((reason, message) => [reason, "validation_error", message], "validation");
|
|
15
15
|
var QUERY = [
|
|
16
16
|
["query.aborted", "the search was stopped before it finished"],
|
|
@@ -23,8 +23,10 @@ var QUERY = [
|
|
|
23
23
|
["query.invalid-reference", "a reference in the query is not valid"],
|
|
24
24
|
["query.invalid-tag", "a tag in the query is not valid"],
|
|
25
25
|
["query.invalid-topic", "a topic in the query is not valid"],
|
|
26
|
-
["query.topic-scope", "a topic needs its chat in the query"]
|
|
27
|
-
|
|
26
|
+
["query.topic-scope", "a topic needs its chat in the query"],
|
|
27
|
+
["query.short-text", "a search by part of a name or a title needs three characters or more"],
|
|
28
|
+
["query.legacy-date-field", "after: and before: are written date>= and date<"]
|
|
29
|
+
].map(([reason, message]) => validation(reason, message)).concat([["query.no-match", "not_found", "no person or chat in the store fits a name in the query"]]);
|
|
28
30
|
var SIGN_IN = [
|
|
29
31
|
["oauth.declined", "authentication_error", "the provider's consent was declined"],
|
|
30
32
|
["oauth.timeout", "timeout", "the sign-in was not finished in time"],
|
|
@@ -68,7 +70,41 @@ var PROVIDER_API = [
|
|
|
68
70
|
var OTHERS = [
|
|
69
71
|
["query.time-limit", "timeout", "the search took longer than its time limit; the query itself is valid"],
|
|
70
72
|
["enrichment.owner-only", "permission_error", "only the owner turns enrichment on, not an agent"],
|
|
73
|
+
["search-harder.owner-only", "permission_error", "only the owner allows search all --harder, not an agent"],
|
|
71
74
|
["model.offline", "permission_error", "downloading a model needs the network; --offline was requested"],
|
|
75
|
+
["model.key-rejected", "invalid_response", "the model provider refused the API key (401 or 403)"],
|
|
76
|
+
["model.unreachable", "invalid_response", "the model provider could not be reached over the network"],
|
|
77
|
+
[
|
|
78
|
+
"model.empty-answer",
|
|
79
|
+
"invalid_response",
|
|
80
|
+
"the model answered nothing; given a picture, it may not read pictures \u2014 choose a vision model"
|
|
81
|
+
],
|
|
82
|
+
validation("model.address-refused", "the model address must be https, or http only on this computer"),
|
|
83
|
+
[
|
|
84
|
+
"local-only.refused",
|
|
85
|
+
"permission_error",
|
|
86
|
+
"local only is on and the address is not on this computer; nothing was sent"
|
|
87
|
+
],
|
|
88
|
+
["local-only.owner-only", "permission_error", "only the owner turns local only off, not an agent"],
|
|
89
|
+
["ai.images-not-allowed", "permission_error", "the AI model may not read pictures; models ai set --allow-remote"],
|
|
90
|
+
["picture-reading.off", "permission_error", "picture reading is never; models picture-reading set request"],
|
|
91
|
+
["picture-reading.owner-only", "permission_error", "only the owner turns picture reading on, not an agent"],
|
|
92
|
+
validation("picture-reading.agent-missing", "choose the agent that reads: --agent claude or --agent codex"),
|
|
93
|
+
validation("picture-reading.not-a-picture", "the file is not a PNG, JPEG or WebP picture"),
|
|
94
|
+
["picture-reading.unavailable-file", "not_found", "the picture could not be fetched, or is over the size limit"],
|
|
95
|
+
["picture-reading.unavailable", "configuration_error", "the chosen coding agent is not installed"],
|
|
96
|
+
["picture-reading.failed", "invalid_response", "the coding agent failed or answered nothing"],
|
|
97
|
+
["picture-reading.timeout", "timeout", "the coding agent gave no answer in time"],
|
|
98
|
+
[
|
|
99
|
+
"ai.owner-only",
|
|
100
|
+
"permission_error",
|
|
101
|
+
"only the owner chooses, unsets, checks or removes the AI model and its key, or revokes its consent"
|
|
102
|
+
],
|
|
103
|
+
["ai.setting-invalid", "configuration_error", "the ai section or the model given is not one WireCat can use"],
|
|
104
|
+
validation("ai.address-refused", "the AI model setting names an address WireCat refuses: plain http to another computer, or Ollama off this computer"),
|
|
105
|
+
["ai.not-set", "configuration_error", "no AI model is chosen; models ai set chooses one"],
|
|
106
|
+
["ai.key-missing", "configuration_error", "no API key is stored for the AI model's address"],
|
|
107
|
+
["ai.ok", "invalid_response", "models ai check: the model answered (a result, never raised)"],
|
|
72
108
|
[
|
|
73
109
|
"contract.unacknowledged-override",
|
|
74
110
|
"configuration_error",
|
|
@@ -91,7 +127,20 @@ var OTHERS = [
|
|
|
91
127
|
validation("mail-findings.invalid", "a checked mail findings batch would be refused; details.problems names why, finding by finding"),
|
|
92
128
|
validation("mail-findings.key-used", "the findings batch key was already used for different input"),
|
|
93
129
|
validation("finding.unknown-field", "a finding has a field its kind does not take"),
|
|
130
|
+
validation("finding.quote-not-found", "a finding's quote is not in the text it cites, word for word"),
|
|
94
131
|
validation("finding.missing-field", "a finding leaves out a field its kind needs"),
|
|
132
|
+
[
|
|
133
|
+
"agent.unrestricted",
|
|
134
|
+
"permission_error",
|
|
135
|
+
"nothing holds this agent to the CLI's commands, so no schedule starts it"
|
|
136
|
+
],
|
|
137
|
+
["read-only.output-outside", "permission_error", "a read-only process writes files only inside its working folder"],
|
|
138
|
+
[
|
|
139
|
+
"agent.refused",
|
|
140
|
+
"permission_error",
|
|
141
|
+
"the schedule changed since it was saved, or starts no agent a schedule may run"
|
|
142
|
+
],
|
|
143
|
+
validation("agent.cost-unknown", "the agent reports no cost, so a cost cap cannot stop it"),
|
|
95
144
|
validation("document.changed", "the document changed while it was read; nothing was saved"),
|
|
96
145
|
["document.not-imported", "not_found", "the document is not imported in this source account"],
|
|
97
146
|
["extraction.invalid-proposals", "invalid_response", "the model's memory proposals could not be used"],
|
|
@@ -162,7 +211,7 @@ var OTHERS = [
|
|
|
162
211
|
[
|
|
163
212
|
"source.needs-sign-in",
|
|
164
213
|
"authentication_error",
|
|
165
|
-
"the page asks for a sign-in; a private Google document
|
|
214
|
+
"the page asks for a sign-in; add a private Google document with drive documents add <url> --profiles <names|all>"
|
|
166
215
|
],
|
|
167
216
|
validation("source.too-large", "the source is larger than one read takes"),
|
|
168
217
|
validation("source.unsupported", "no reader takes this kind of source"),
|
|
@@ -203,6 +252,11 @@ var OTHERS = [
|
|
|
203
252
|
"configuration_error",
|
|
204
253
|
"the store file is damaged; store recover says what is lost and recovers it"
|
|
205
254
|
],
|
|
255
|
+
[
|
|
256
|
+
"store.journal-replaced",
|
|
257
|
+
"conflict",
|
|
258
|
+
"another program deleted or replaced the store's journal file while it was open; store recover says what to do"
|
|
259
|
+
],
|
|
206
260
|
validation("store.file-damaged", "the named store file is damaged or not a database"),
|
|
207
261
|
[
|
|
208
262
|
"store.unreadable",
|
|
@@ -291,8 +345,25 @@ var OTHERS = [
|
|
|
291
345
|
validation("deal.closed", "a deleted deal or lead does not move or close"),
|
|
292
346
|
validation("deal.copy", "a CRM's copy changes in the CRM; its next sync brings the change here"),
|
|
293
347
|
validation("deal.field", "a field of the deal or lead is not valid"),
|
|
348
|
+
["deal.denied", "permission_error", "the profile denies listing deals or leads, so none is answered"],
|
|
349
|
+
["deal.out-of-scope", "not_found", "the deal or lead is a copy from an account outside the accounts asked for"],
|
|
294
350
|
validation("deal.ref", "the reference names no deal or lead"),
|
|
295
351
|
validation("deal.stage", "no stage of that name, or a stage name more than one pipeline has"),
|
|
352
|
+
validation("stage.base-field", "a base stage needs a name its set has once and a position within the set"),
|
|
353
|
+
validation("stage.base-outcome", "a base set keeps at least one stage of each outcome: open, won and lost"),
|
|
354
|
+
validation("stage.base-in-use", "the owner's own deals or leads stand or stood in that base stage"),
|
|
355
|
+
validation("stage.choice-required", "more than one stage of the row's pipeline maps to that base stage; move to one of the candidates"),
|
|
356
|
+
validation("stage.ref", "a stage is named by its stage:<id> reference"),
|
|
357
|
+
["stage.owner-only", "permission_error", "only the owner confirms mappings and edits a base set, not an agent"],
|
|
358
|
+
validation("stage.unmapped", "no stage of the row's pipeline maps to that base stage; map one first"),
|
|
359
|
+
["stage.not-found", "not_found", "no stored stage has that reference or name"],
|
|
360
|
+
validation("stage.answer-invalid", "the agent's answer to stages suggest is not the JSON stage map it asks for"),
|
|
361
|
+
["stage.model-answer-invalid", "invalid_response", "the AI model's answer to stages suggest is not the stage map"],
|
|
362
|
+
[
|
|
363
|
+
"stage.model-agent",
|
|
364
|
+
"permission_error",
|
|
365
|
+
"an agent's run does not send stages to the AI model; it answers the task itself with --dry-run and --text-file"
|
|
366
|
+
],
|
|
296
367
|
validation("pipeline.ambiguous", "more than one pipeline has that name; name it by its pipeline: reference"),
|
|
297
368
|
validation("pipeline.duplicate", "a pipeline of that name and kind is already stored"),
|
|
298
369
|
validation("pipeline.field", "a pipeline needs a name and at least one stage, each named once"),
|
|
@@ -306,9 +377,12 @@ var OTHERS = [
|
|
|
306
377
|
validation("field.unknown-kind", "fields are listed for deals, leads, people and organizations only"),
|
|
307
378
|
validation("crm.write-unsupported", "the CRM does not take this write, or does not recognise a repeated one"),
|
|
308
379
|
validation("crm.unlisted-held", "a list of every id would mark most of a kind deleted; nothing was, until --rescan"),
|
|
380
|
+
validation("crm.narrowing-held", "the default scope mine would mark most of a kind's stored rows deleted; none is, until the owner sets the scope"),
|
|
381
|
+
validation("crm.unassigned-dropped", "the CRM does not let this sign-in count a user in unassigned as nobody's; that user's deals are not copied"),
|
|
309
382
|
validation("crm.not-reported", "the CRM did not list users or departments; what they would say is unknown, nothing withdrawn"),
|
|
310
383
|
validation("crm.reference-unknown", "a CRM row names a contact, company or user the store does not hold; that link was not made"),
|
|
311
384
|
validation("crm.pending-dropped", "relationships waited too long for an end that never came; they were dropped"),
|
|
385
|
+
validation("crm.activities-failed", "the activities and tasks could not be read; the deals and leads were synced"),
|
|
312
386
|
validation("crm.email-ambiguous", "a CRM contact's email belongs to more than one person; the owner decides"),
|
|
313
387
|
validation("crm.own-unknown", "no own company of the CRM account is stored, so its users are no one's employees yet"),
|
|
314
388
|
validation("relationship.reference-unknown", "a reported relationship names something the store does not hold"),
|
|
@@ -347,17 +421,51 @@ var OTHERS = [
|
|
|
347
421
|
validation("order.status", "a rejected or deleted order's status does not change"),
|
|
348
422
|
["model.not-downloaded", "not_found", "the model is not downloaded on this machine"],
|
|
349
423
|
["person.no-owner", "not_found", "no person is marked as the owner in the store"],
|
|
424
|
+
["person.unknown", "not_found", "the store has no person by that reference; people list gives person:<uid>"],
|
|
425
|
+
["person.no-doubt", "not_found", "nothing about that person is in doubt; people links check lists who is"],
|
|
426
|
+
validation("person.owner", "the owner's own person is not test data"),
|
|
427
|
+
validation("person.no-identity", "a person with no identity is not test data; there is nothing to hide"),
|
|
428
|
+
validation("person.from-required", "say whom the identity leaves: --from person:<uid>, or person:me for the owner"),
|
|
350
429
|
[
|
|
351
430
|
"identity.separated",
|
|
352
431
|
"conflict",
|
|
353
432
|
"the owner separated this identity from that person; only the owner links it again"
|
|
354
433
|
],
|
|
355
|
-
[
|
|
434
|
+
[
|
|
435
|
+
"identity.owner-only",
|
|
436
|
+
"permission_error",
|
|
437
|
+
"only the owner undoes a merge, splits a person, confirms or undoes a link, or links an identity to themselves"
|
|
438
|
+
],
|
|
356
439
|
[
|
|
357
440
|
"identity.stale",
|
|
358
441
|
"conflict",
|
|
359
|
-
"
|
|
442
|
+
"the people a merge or a proposed link names changed since; undo the later merge, or propose the link again"
|
|
443
|
+
],
|
|
444
|
+
["identity.no-merge", "not_found", "nothing of that person is merged into the other; people show lists the merges"],
|
|
445
|
+
validation("identity.held-elsewhere", "the identity sits on another person than the one named; name that person to take it off them"),
|
|
446
|
+
validation("identity.several-persons", "the identities that leave a person are all of that one person"),
|
|
447
|
+
validation("identity.nothing-left", "a split leaves at least one identity with the person"),
|
|
448
|
+
[
|
|
449
|
+
"identity.kept-together",
|
|
450
|
+
"conflict",
|
|
451
|
+
"the owner kept these identities together by turning down their split; only the owner splits them"
|
|
452
|
+
],
|
|
453
|
+
[
|
|
454
|
+
"identity.rejected",
|
|
455
|
+
"conflict",
|
|
456
|
+
"the owner rejected linking these people on this evidence; only a new signal or identity proposes them again"
|
|
360
457
|
],
|
|
458
|
+
validation("identity.same", "the two identities are one person already"),
|
|
459
|
+
validation("identity.not-shared", "only a match on a shared mailbox can say the mailbox is a company's"),
|
|
460
|
+
["organization.not-found", "not_found", "no stored organization has that id"],
|
|
461
|
+
validation("organization.unnamed", "a free mailbox names no company; name the organization or the company"),
|
|
462
|
+
validation("organization.ambiguous", "more than one organization matches; name the one meant as a reference"),
|
|
463
|
+
validation("identity.shared-phone", "more than six people share the phone number, so it proposes no one"),
|
|
464
|
+
validation("identity.common-name", "more than six people have the name, so it proposes no one"),
|
|
465
|
+
validation("identity.owner", "one side is the owner's person, and only the owner joins anyone to themselves"),
|
|
466
|
+
validation("identity.shared-email", "more than six people share the address, so it proposes no one"),
|
|
467
|
+
validation("identity-link.dedicated-review", "an identity link is staged and decided through the people review"),
|
|
468
|
+
validation("identity-split.dedicated-review", "a split of a person is staged and decided through the people review"),
|
|
361
469
|
["transcription.no-key", "authentication_error", "no OpenAI key is set for transcription"],
|
|
362
470
|
validation("transcription.too-large", "the audio is over the transcription provider's size limit"),
|
|
363
471
|
[
|
|
@@ -372,8 +480,9 @@ var OTHERS = [
|
|
|
372
480
|
validation("output.unknown-field", "the answer has no field by that name"),
|
|
373
481
|
validation("name.taken", "the name is already used"),
|
|
374
482
|
validation("period.ambiguous", "the period can be read more than one way"),
|
|
483
|
+
["press.owner-hand-only", "permission_error", "this button decides something for the owner; only a hand presses it"],
|
|
375
484
|
validation("proposal.wrong-state", "the proposal is not in a state that allows this"),
|
|
376
|
-
validation("proposal.reason-required", "an agent deciding for the owner gives a reason"),
|
|
485
|
+
validation("proposal.reason-required", "an agent deciding for the owner, or proposing a link, gives a reason"),
|
|
377
486
|
validation("decision.request-invalid", "a decision request needs its batch, message, owner and distinct known actions"),
|
|
378
487
|
["decision.token-unknown", "not_found", "no button has this token"],
|
|
379
488
|
["decision.token-used", "permission_error", "this button was already pressed"],
|
|
@@ -390,6 +499,7 @@ var OTHERS = [
|
|
|
390
499
|
],
|
|
391
500
|
validation("proposal.decider-required", "a decision names who decides: the owner or an agent with a reason"),
|
|
392
501
|
validation("proposal.ids", "the proposal ids cannot be read"),
|
|
502
|
+
["group.outside", "permission_error", "the process is locked to a group, and this belongs to accounts outside it"],
|
|
393
503
|
["proposal.own", "permission_error", "an agent never decides its own proposal"],
|
|
394
504
|
["proposal.owner-only", "permission_error", "only the owner decides this proposal"],
|
|
395
505
|
["proposals.agent-decisions-off", "permission_error", "agent decisions are turned off; the owner decides"],
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
agentOf,
|
|
30
30
|
clientHash,
|
|
31
31
|
currentCaller
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XQYKIZMG.js";
|
|
33
33
|
import {
|
|
34
34
|
__name
|
|
35
35
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -541,7 +541,7 @@ function toError(value) {
|
|
|
541
541
|
}
|
|
542
542
|
__name(toError, "toError");
|
|
543
543
|
|
|
544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
545
545
|
var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
|
|
546
546
|
const client = caller?.agent?.client?.name;
|
|
547
547
|
if (client && client !== "unknown")
|
|
@@ -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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/background/processes.js
|
|
8
8
|
import { execFileSync } from "node:child_process";
|
|
9
9
|
import { readdirSync, readFileSync, readlinkSync } from "node:fs";
|
|
10
10
|
var alive = /* @__PURE__ */ __name((pid) => {
|
|
@@ -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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
|
|
8
8
|
var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
|
|
9
9
|
var kindsByConstructor = /* @__PURE__ */ new WeakMap();
|
|
10
10
|
function collectKinds(ctor) {
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
errorCodes,
|
|
5
5
|
isCliError,
|
|
6
6
|
visibleControls
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VUBZFMGP.js";
|
|
8
8
|
import {
|
|
9
9
|
__name
|
|
10
10
|
} from "./chunk-ZVVMGPBJ.js";
|
|
11
11
|
|
|
12
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
12
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
|
|
13
13
|
var EXIT_CODES = {
|
|
14
14
|
validation_error: 2,
|
|
15
15
|
configuration_error: 3,
|
|
@@ -704,6 +704,29 @@ function nullable(wrapped, default_) {
|
|
|
704
704
|
}
|
|
705
705
|
__name(nullable, "nullable");
|
|
706
706
|
// @__NO_SIDE_EFFECTS__
|
|
707
|
+
function nullish(wrapped, default_) {
|
|
708
|
+
return _standardSchema({
|
|
709
|
+
kind: "schema",
|
|
710
|
+
type: "nullish",
|
|
711
|
+
reference: nullish,
|
|
712
|
+
expects: `(${wrapped.expects} | null | undefined)`,
|
|
713
|
+
async: false,
|
|
714
|
+
wrapped,
|
|
715
|
+
default: default_,
|
|
716
|
+
"~run"(dataset, config$1) {
|
|
717
|
+
if (dataset.value === null || dataset.value === void 0) {
|
|
718
|
+
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
719
|
+
if (dataset.value === null || dataset.value === void 0) {
|
|
720
|
+
dataset.typed = true;
|
|
721
|
+
return dataset;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
return this.wrapped["~run"](dataset, config$1);
|
|
725
|
+
}
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
__name(nullish, "nullish");
|
|
729
|
+
// @__NO_SIDE_EFFECTS__
|
|
707
730
|
function number(message$1) {
|
|
708
731
|
return _standardSchema({
|
|
709
732
|
kind: "schema",
|
|
@@ -1334,7 +1357,7 @@ function unwrap(schema) {
|
|
|
1334
1357
|
}
|
|
1335
1358
|
__name(unwrap, "unwrap");
|
|
1336
1359
|
|
|
1337
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1360
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
|
|
1338
1361
|
var EFFECT_LEVELS = ["none", "read", "write"];
|
|
1339
1362
|
var effectsSchema = strictObject({
|
|
1340
1363
|
remote: picklist(EFFECT_LEVELS),
|
|
@@ -1971,7 +1994,7 @@ function toStandardJsonSchema(schema) {
|
|
|
1971
1994
|
}
|
|
1972
1995
|
__name(toStandardJsonSchema, "toStandardJsonSchema");
|
|
1973
1996
|
|
|
1974
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1997
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
|
|
1975
1998
|
var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
|
|
1976
1999
|
var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
|
|
1977
2000
|
var text = pipe(string(), regex(/\S/, "must not be empty"));
|
|
@@ -2013,7 +2036,7 @@ var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHO
|
|
|
2013
2036
|
return String(value);
|
|
2014
2037
|
}), "fill");
|
|
2015
2038
|
|
|
2016
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2039
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
|
|
2017
2040
|
var MAX_NEXT_STEPS = 2;
|
|
2018
2041
|
var COMPACT_FLAG = "--compact";
|
|
2019
2042
|
var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
|
|
@@ -2125,7 +2148,7 @@ var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
|
|
|
2125
2148
|
JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
|
|
2126
2149
|
].join("\n"), "jsonlOf");
|
|
2127
2150
|
|
|
2128
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2151
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
|
|
2129
2152
|
var CRASH_CODE = "internal_error";
|
|
2130
2153
|
var CRASH_REASON = "command.crashed";
|
|
2131
2154
|
var errorObjectSchema = strictObject({
|
|
@@ -2218,7 +2241,7 @@ var BASE_REASONS = defineReasons([
|
|
|
2218
2241
|
{ reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
|
|
2219
2242
|
]);
|
|
2220
2243
|
|
|
2221
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2244
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
|
|
2222
2245
|
var SAME_COMMAND = "*";
|
|
2223
2246
|
var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
|
|
2224
2247
|
var stepSchema = union([
|
|
@@ -2297,7 +2320,7 @@ var STEPS = defineSteps([
|
|
|
2297
2320
|
}
|
|
2298
2321
|
]);
|
|
2299
2322
|
|
|
2300
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2323
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
|
|
2301
2324
|
var recognise = /* @__PURE__ */ __name((failure) => {
|
|
2302
2325
|
if (isCliError(failure))
|
|
2303
2326
|
return failure;
|
|
@@ -2474,6 +2497,7 @@ export {
|
|
|
2474
2497
|
looseObject,
|
|
2475
2498
|
null_,
|
|
2476
2499
|
nullable,
|
|
2500
|
+
nullish,
|
|
2477
2501
|
number,
|
|
2478
2502
|
object,
|
|
2479
2503
|
objectWithRest,
|
|
@@ -2,31 +2,31 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
updateCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-L4QVOEOB.js";
|
|
6
6
|
import {
|
|
7
7
|
QUESTIONS,
|
|
8
8
|
readSetupAnswers,
|
|
9
9
|
unanswered,
|
|
10
10
|
writeSetupAnswers
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MWGH3M46.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_STEMMERS,
|
|
14
14
|
LANGUAGES
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GY4XCLCO.js";
|
|
16
16
|
import {
|
|
17
17
|
sharedConfigPath
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
storePath
|
|
21
|
-
} from "./chunk-5UKBUI4I.js";
|
|
18
|
+
} from "./chunk-KK4HD3SI.js";
|
|
22
19
|
import {
|
|
23
20
|
installerOf
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RX5CJ55S.js";
|
|
22
|
+
import {
|
|
23
|
+
storePath
|
|
24
|
+
} from "./chunk-LGZPKKBN.js";
|
|
25
25
|
import {
|
|
26
26
|
__name
|
|
27
27
|
} from "./chunk-ZVVMGPBJ.js";
|
|
28
28
|
|
|
29
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/first-run.js
|
|
30
30
|
import { spawnSync } from "node:child_process";
|
|
31
31
|
import { accessSync, constants, realpathSync } from "node:fs";
|
|
32
32
|
import { delimiter, join } from "node:path";
|
|
@@ -84,7 +84,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
|
|
|
84
84
|
return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
|
|
85
85
|
}, "suggested");
|
|
86
86
|
var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
|
|
87
|
-
const { openStore } = await import("./store-
|
|
87
|
+
const { openStore } = await import("./store-CDUL3HKK.js");
|
|
88
88
|
const store = await openStore({ env });
|
|
89
89
|
let rebuild = false;
|
|
90
90
|
try {
|
|
@@ -113,8 +113,8 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
113
113
|
if (!rebuild)
|
|
114
114
|
return;
|
|
115
115
|
const [{ openCache }, { buildStems }] = await Promise.all([
|
|
116
|
-
import("./open-
|
|
117
|
-
import("./store-maintenance-command-
|
|
116
|
+
import("./open-ZDONVKSX.js"),
|
|
117
|
+
import("./store-maintenance-command-XH2JUM5F.js")
|
|
118
118
|
]);
|
|
119
119
|
const database = await openCache(storePath(env));
|
|
120
120
|
try {
|
|
@@ -126,7 +126,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
126
126
|
var askTools = /* @__PURE__ */ __name(async (run) => {
|
|
127
127
|
const { command, env, io } = run;
|
|
128
128
|
const installed = run.installed ?? ((name) => onPath(name, env));
|
|
129
|
-
const { WIRECAT_TOOLS } = await import("./first-screen-
|
|
129
|
+
const { WIRECAT_TOOLS } = await import("./first-screen-Z7HC6PQU.js");
|
|
130
130
|
const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
|
|
131
131
|
const missing = others.filter((tool) => !installed(tool.command));
|
|
132
132
|
io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
|
|
@@ -199,7 +199,7 @@ var setupAtStart = /* @__PURE__ */ __name(async (start) => {
|
|
|
199
199
|
contentLanguages: start.contentLanguages,
|
|
200
200
|
all: start.path[0] === "setup",
|
|
201
201
|
io: {
|
|
202
|
-
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-
|
|
202
|
+
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-JAJ2CUJI.js")).readSecret(prompt, { input, echo: true }), "ask"),
|
|
203
203
|
say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
|
|
204
204
|
`), "say")
|
|
205
205
|
}
|
|
@@ -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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
|
|
8
8
|
var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
|
|
9
9
|
`The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
|
|
10
10
|
"Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
} from "./chunk-Y5E2WNWB.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VUBZFMGP.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/store/vector-extension.js
|
|
14
14
|
import { readFileSync } from "node:fs";
|
|
15
15
|
var musl = /* @__PURE__ */ __name(() => {
|
|
16
16
|
if (process.platform !== "linux")
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__name
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/models/endpoint.js
|
|
8
|
+
var endpoint = /* @__PURE__ */ __name((value) => {
|
|
9
|
+
try {
|
|
10
|
+
const url = new URL(value);
|
|
11
|
+
return ["https:", "http:"].includes(url.protocol) && !url.username && !url.password && !url.search && !url.hash;
|
|
12
|
+
} catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}, "endpoint");
|
|
16
|
+
var loopback = /* @__PURE__ */ __name((hostname) => hostname === "localhost" || hostname === "[::1]" || /^127(\.\d{1,3}){3}$/.test(hostname), "loopback");
|
|
17
|
+
var onThisComputer = /* @__PURE__ */ __name((value) => {
|
|
18
|
+
try {
|
|
19
|
+
return loopback(new URL(value).hostname);
|
|
20
|
+
} catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}, "onThisComputer");
|
|
24
|
+
var modelAddressAllowed = /* @__PURE__ */ __name((value) => endpoint(value) && (new URL(value).protocol === "https:" || onThisComputer(value)), "modelAddressAllowed");
|
|
25
|
+
var PLAIN_HTTP_REFUSED = "this address is not allowed: use https, or http only on this computer";
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
endpoint,
|
|
29
|
+
onThisComputer,
|
|
30
|
+
modelAddressAllowed,
|
|
31
|
+
PLAIN_HTTP_REFUSED
|
|
32
|
+
};
|