@wirecat/bitrix24-cli 0.0.0-stage → 0.2.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 +41 -0
- package/LICENSE +204 -0
- package/README.md +17 -2
- package/dist/api-keys.d.ts +21 -0
- package/dist/api-keys.d.ts.map +1 -0
- package/dist/api-keys.js +58 -0
- package/dist/api-keys.js.map +1 -0
- package/dist/bin/b24.d.ts +3 -0
- package/dist/bin/b24.d.ts.map +1 -0
- package/dist/bin/b24.js +40 -0
- package/dist/bin/b24.js.map +1 -0
- package/dist/bitrix/errors.d.ts +22 -0
- package/dist/bitrix/errors.d.ts.map +1 -0
- package/dist/bitrix/errors.js +76 -0
- package/dist/bitrix/errors.js.map +1 -0
- package/dist/bitrix/methods.d.ts +13 -0
- package/dist/bitrix/methods.d.ts.map +1 -0
- package/dist/bitrix/methods.js +33 -0
- package/dist/bitrix/methods.js.map +1 -0
- package/dist/bitrix/transport.d.ts +50 -0
- package/dist/bitrix/transport.d.ts.map +1 -0
- package/dist/bitrix/transport.js +189 -0
- package/dist/bitrix/transport.js.map +1 -0
- package/dist/bitrix/webhook.d.ts +14 -0
- package/dist/bitrix/webhook.d.ts.map +1 -0
- package/dist/bitrix/webhook.js +29 -0
- package/dist/bitrix/webhook.js.map +1 -0
- package/dist/bundle/all-profiles-QJ444GSX.js +24 -0
- package/dist/bundle/anthropic-RHRAVHC2.js +70 -0
- package/dist/bundle/app-server-QIT6S7AZ.js +224 -0
- package/dist/bundle/b24.js +32 -0
- package/dist/bundle/bun-H6RSODZ3.js +169 -0
- package/dist/bundle/bun-sqlite-BO4LTQHX.js +69 -0
- package/dist/bundle/chunk-2KCZ7BKW.js +215 -0
- package/dist/bundle/chunk-2SNUMZ7S.js +1028 -0
- package/dist/bundle/chunk-45AKJVKV.js +24 -0
- package/dist/bundle/chunk-4PDYYS5K.js +2 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-6WY72XVQ.js +216 -0
- package/dist/bundle/chunk-7GRZAKBB.js +639 -0
- package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
- package/dist/bundle/chunk-BCF7P4FZ.js +558 -0
- package/dist/bundle/chunk-CNNEA2M4.js +54 -0
- package/dist/bundle/chunk-CXL33BFL.js +570 -0
- package/dist/bundle/chunk-D5S6QV6R.js +95 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DTXERR44.js +35 -0
- package/dist/bundle/chunk-EVYSBZ3I.js +153 -0
- package/dist/bundle/chunk-EXOOKUEA.js +82 -0
- package/dist/bundle/chunk-FLUEXJ4X.js +53 -0
- package/dist/bundle/chunk-FOTREPNS.js +366 -0
- package/dist/bundle/chunk-FZL7F5NR.js +2022 -0
- package/dist/bundle/chunk-GDFNH33E.js +1691 -0
- package/dist/bundle/chunk-H2ADPPSH.js +50910 -0
- package/dist/bundle/chunk-HAXNUIGQ.js +1245 -0
- package/dist/bundle/chunk-HGL63O5V.js +288 -0
- package/dist/bundle/chunk-INFYLWUA.js +929 -0
- package/dist/bundle/chunk-IRV2PCQ2.js +5213 -0
- package/dist/bundle/chunk-K3UIB6ZF.js +45 -0
- package/dist/bundle/chunk-LRGYKOCP.js +91 -0
- package/dist/bundle/chunk-LSPIOT6Z.js +459 -0
- package/dist/bundle/chunk-MBDK4YXG.js +34 -0
- package/dist/bundle/chunk-N6FLBXZS.js +73 -0
- package/dist/bundle/chunk-OTD2ZRXD.js +161 -0
- package/dist/bundle/chunk-P33NDCDI.js +78 -0
- package/dist/bundle/chunk-P364PLIK.js +257 -0
- package/dist/bundle/chunk-PH5FZX6E.js +193 -0
- package/dist/bundle/chunk-POC3V3AO.js +36616 -0
- package/dist/bundle/chunk-QC53QBNC.js +143 -0
- package/dist/bundle/chunk-QGMDQ2PM.js +122 -0
- package/dist/bundle/chunk-QIPTIUMJ.js +281 -0
- package/dist/bundle/chunk-QMPN6WKD.js +3512 -0
- package/dist/bundle/chunk-QQXH2OPB.js +594 -0
- package/dist/bundle/chunk-QSNROIJL.js +413 -0
- package/dist/bundle/chunk-RRJNNPR4.js +76 -0
- package/dist/bundle/chunk-SFRNX2TI.js +6848 -0
- package/dist/bundle/chunk-SGRYYE4X.js +266 -0
- package/dist/bundle/chunk-TE3FR6MI.js +884 -0
- package/dist/bundle/chunk-U5ACMCAQ.js +12049 -0
- package/dist/bundle/chunk-VEWWAGTD.js +2315 -0
- package/dist/bundle/chunk-VL6SPMZV.js +194 -0
- package/dist/bundle/chunk-WII44RXN.js +58 -0
- package/dist/bundle/chunk-WKRQ44EH.js +528 -0
- package/dist/bundle/chunk-WTPMJYMD.js +8308 -0
- package/dist/bundle/chunk-XD4FRDSL.js +565 -0
- package/dist/bundle/chunk-XJXONOB5.js +63 -0
- package/dist/bundle/chunk-XNHSPHUN.js +48 -0
- package/dist/bundle/chunk-XRFJWHY5.js +131 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YYO7D2MO.js +783 -0
- package/dist/bundle/chunk-YZ5LHE5Q.js +31 -0
- package/dist/bundle/chunk-ZDQQCXFG.js +392 -0
- package/dist/bundle/chunk-ZEW4P6AH.js +158 -0
- package/dist/bundle/chunk-ZGZT5S6B.js +3480 -0
- package/dist/bundle/chunk-ZIAQPTUS.js +82 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-OKQOE6G4.js +30 -0
- package/dist/bundle/decode-5ZPLTYV6.js +160 -0
- package/dist/bundle/dist-6Y64DTOE.js +7577 -0
- package/dist/bundle/echarts-J6LAPIX7.js +42501 -0
- package/dist/bundle/embed-YG5LDHME.js +35 -0
- package/dist/bundle/embedder-7FNUA5OZ.js +108 -0
- package/dist/bundle/first-run-JPZNWIJN.js +23 -0
- package/dist/bundle/first-screen-VQM4MTS7.js +28 -0
- package/dist/bundle/instructions-AXWTQHMR.js +11 -0
- package/dist/bundle/mcp-7F46P6AM.js +165 -0
- package/dist/bundle/mcp-HUD6UH5X.js +160 -0
- package/dist/bundle/mcp-J5R5A65I.js +87 -0
- package/dist/bundle/node-CWKAIOEM.js +176 -0
- package/dist/bundle/node-P4E63KXA.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-LSEKVRDA.js +67 -0
- package/dist/bundle/oauth-THYNLRLD.js +17 -0
- package/dist/bundle/open-E47QYKFC.js +20 -0
- package/dist/bundle/openai-EWSGC3BC.js +227 -0
- package/dist/bundle/process-WKTEA3WE.js +91 -0
- package/dist/bundle/program-UYX5362I.js +20851 -0
- package/dist/bundle/prompt-CAQ7QR3U.js +12 -0
- package/dist/bundle/recognize-6KGHNZC3.js +23 -0
- package/dist/bundle/remote-3UO2WDC3.js +26 -0
- package/dist/bundle/rerank-2JVDPZBX.js +49 -0
- package/dist/bundle/serve-ES7AG5IK.js +19 -0
- package/dist/bundle/server-5LE5LNUQ.js +45 -0
- package/dist/bundle/server-BU4VBM6S.js +58 -0
- package/dist/bundle/state-7NH5G4XJ.js +33 -0
- package/dist/bundle/store-7O4JQD2Z.js +127 -0
- package/dist/bundle/store-maintenance-command-UDVGEY2D.js +47 -0
- package/dist/commands/api.d.ts +3 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +131 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/crm-writes.d.ts +4 -0
- package/dist/commands/crm-writes.d.ts.map +1 -0
- package/dist/commands/crm-writes.js +182 -0
- package/dist/commands/crm-writes.js.map +1 -0
- package/dist/commands/crm.d.ts +3 -0
- package/dist/commands/crm.d.ts.map +1 -0
- package/dist/commands/crm.js +144 -0
- package/dist/commands/crm.js.map +1 -0
- package/dist/commands/doctor.d.ts +77 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +74 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +97 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/session.d.ts +3 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +101 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/write.d.ts +21 -0
- package/dist/commands/write.d.ts.map +1 -0
- package/dist/commands/write.js +47 -0
- package/dist/commands/write.js.map +1 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +17 -0
- package/dist/config.js.map +1 -0
- package/dist/crm/conditions.d.ts +25 -0
- package/dist/crm/conditions.d.ts.map +1 -0
- package/dist/crm/conditions.js +78 -0
- package/dist/crm/conditions.js.map +1 -0
- package/dist/crm/deal.d.ts +27 -0
- package/dist/crm/deal.d.ts.map +1 -0
- package/dist/crm/deal.js +74 -0
- package/dist/crm/deal.js.map +1 -0
- package/dist/crm/items.d.ts +30 -0
- package/dist/crm/items.d.ts.map +1 -0
- package/dist/crm/items.js +76 -0
- package/dist/crm/items.js.map +1 -0
- package/dist/crm/lead.d.ts +36 -0
- package/dist/crm/lead.d.ts.map +1 -0
- package/dist/crm/lead.js +85 -0
- package/dist/crm/lead.js.map +1 -0
- package/dist/crm/organization.d.ts +32 -0
- package/dist/crm/organization.d.ts.map +1 -0
- package/dist/crm/organization.js +67 -0
- package/dist/crm/organization.js.map +1 -0
- package/dist/crm/person.d.ts +31 -0
- package/dist/crm/person.d.ts.map +1 -0
- package/dist/crm/person.js +67 -0
- package/dist/crm/person.js.map +1 -0
- package/dist/crm/pipeline.d.ts +17 -0
- package/dist/crm/pipeline.d.ts.map +1 -0
- package/dist/crm/pipeline.js +42 -0
- package/dist/crm/pipeline.js.map +1 -0
- package/dist/crm/product.d.ts +43 -0
- package/dist/crm/product.d.ts.map +1 -0
- package/dist/crm/product.js +42 -0
- package/dist/crm/product.js.map +1 -0
- package/dist/crm/stage.d.ts +20 -0
- package/dist/crm/stage.d.ts.map +1 -0
- package/dist/crm/stage.js +65 -0
- package/dist/crm/stage.js.map +1 -0
- package/dist/crm/user.d.ts +39 -0
- package/dist/crm/user.d.ts.map +1 -0
- package/dist/crm/user.js +54 -0
- package/dist/crm/user.js.map +1 -0
- package/dist/crm/values.d.ts +33 -0
- package/dist/crm/values.d.ts.map +1 -0
- package/dist/crm/values.js +54 -0
- package/dist/crm/values.js.map +1 -0
- package/dist/crm/walk.d.ts +19 -0
- package/dist/crm/walk.d.ts.map +1 -0
- package/dist/crm/walk.js +22 -0
- package/dist/crm/walk.js.map +1 -0
- package/dist/identity.d.ts +5 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +18 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp.d.ts +29 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +99 -0
- package/dist/mcp.js.map +1 -0
- package/dist/portal.d.ts +47 -0
- package/dist/portal.d.ts.map +1 -0
- package/dist/portal.js +52 -0
- package/dist/portal.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +45 -0
- package/dist/program.js.map +1 -0
- package/dist/reasons.d.ts +10 -0
- package/dist/reasons.d.ts.map +1 -0
- package/dist/reasons.js +28 -0
- package/dist/reasons.js.map +1 -0
- package/dist/token.d.ts +12 -0
- package/dist/token.d.ts.map +1 -0
- package/dist/token.js +41 -0
- package/dist/token.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/whoami.d.ts +8 -0
- package/dist/whoami.d.ts.map +1 -0
- package/dist/whoami.js +9 -0
- package/dist/whoami.js.map +1 -0
- package/package.json +83 -4
- package/skills/bitrix24-cli/SKILL.md +41 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
QUERY_REASONS
|
|
5
|
+
} from "./chunk-ZGZT5S6B.js";
|
|
6
|
+
import {
|
|
7
|
+
defineReasons
|
|
8
|
+
} from "./chunk-IRV2PCQ2.js";
|
|
9
|
+
import {
|
|
10
|
+
__name
|
|
11
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
12
|
+
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/errors/reasons.js
|
|
14
|
+
var validation = /* @__PURE__ */ __name((reason, message) => [reason, "validation_error", message], "validation");
|
|
15
|
+
var QUERY = [
|
|
16
|
+
["query.aborted", "the search was stopped before it finished"],
|
|
17
|
+
["query.conflict", "two parts of the query contradict each other"],
|
|
18
|
+
["query.invalid-context", "the context size is out of range"],
|
|
19
|
+
["query.invalid-limit", "the limit is out of range"],
|
|
20
|
+
["query.invalid-scope", "the query selects no account"],
|
|
21
|
+
["query.invalid-duration", "a duration in the query cannot be read"],
|
|
22
|
+
["query.invalid-size", "a size in the query cannot be read"],
|
|
23
|
+
["query.invalid-reference", "a reference in the query is not valid"],
|
|
24
|
+
["query.invalid-tag", "a tag in the query is not valid"],
|
|
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
|
+
].map(([reason, message]) => validation(reason, message));
|
|
28
|
+
var SIGN_IN = [
|
|
29
|
+
["oauth.declined", "authentication_error", "the provider's consent was declined"],
|
|
30
|
+
["oauth.timeout", "timeout", "the sign-in was not finished in time"],
|
|
31
|
+
["oauth.mismatch", "authentication_error", "the pasted sign-in result belongs to another sign-in"],
|
|
32
|
+
["oauth.missing", "authentication_error", "this profile is not signed in"],
|
|
33
|
+
["oauth.locked", "provider_unavailable", "another process holds this sign-in's lock"],
|
|
34
|
+
["oauth.no-response", "outcome_unknown", "the token request did not finish"],
|
|
35
|
+
["oauth.unavailable", "provider_unavailable", "the provider's token endpoint is unavailable"],
|
|
36
|
+
["oauth.expired", "authentication_error", "the provider refused the saved sign-in; sign in again"],
|
|
37
|
+
["oauth.invalid-response", "invalid_response", "the provider's token response could not be used"],
|
|
38
|
+
["oauth.failed", "authentication_error", "the provider returned no offline refresh token"],
|
|
39
|
+
["oauth.revoke-failed", "outcome_unknown", "the provider did not confirm the revoke"],
|
|
40
|
+
["oauth.invalid", "authentication_error", "the saved sign-in cannot be read"],
|
|
41
|
+
["oauth.not-saved", "configuration_error", "the sign-in cannot be saved or read where it is kept"],
|
|
42
|
+
["sign-in.client-file-open", "configuration_error", "other users of this computer can read the client file"],
|
|
43
|
+
["sign-in.client-file-invalid", "configuration_error", "the file is not a Desktop app OAuth client JSON"],
|
|
44
|
+
["oauth.scope-missing", "permission_error", "the sign-in lacks a permission this command needs"],
|
|
45
|
+
["sign-in.client-rejected", "configuration_error", "the provider rejected the OAuth client"],
|
|
46
|
+
["sign-in.secret-without-id", "configuration_error", "an OAuth client secret is set without its client id"]
|
|
47
|
+
];
|
|
48
|
+
var PROVIDER_API = [
|
|
49
|
+
["offline.refused", "permission_error", "this command needs the provider; --offline was given"],
|
|
50
|
+
validation("api.unknown-method", "the provider has no method by this name"),
|
|
51
|
+
["api.disabled", "configuration_error", "the provider's API is turned off for this OAuth project"],
|
|
52
|
+
["provider.usage-limit", "rate_limited", "the account's usage limit at the provider is reached; wait, do not retry"],
|
|
53
|
+
["file.not-found", "not_found", "the file named, or its folder, does not exist"],
|
|
54
|
+
validation("file.not-a-file", "the path names a folder or another thing that is not a file"),
|
|
55
|
+
["file.denied", "permission_error", "the file cannot be opened: permission denied"]
|
|
56
|
+
];
|
|
57
|
+
var OTHERS = [
|
|
58
|
+
["query.time-limit", "timeout", "the search took longer than its time limit; the query itself is valid"],
|
|
59
|
+
["model.offline", "permission_error", "downloading a model needs the network; --offline was requested"],
|
|
60
|
+
[
|
|
61
|
+
"contract.unacknowledged-override",
|
|
62
|
+
"configuration_error",
|
|
63
|
+
"a shared command contract changed without an explicit override"
|
|
64
|
+
],
|
|
65
|
+
validation("context.read-budget", "the selected context reads exceed their text or request allowance"),
|
|
66
|
+
validation("meeting-findings.stale", "meeting findings changed since they were read; stage a new batch"),
|
|
67
|
+
validation("meeting-findings.dedicated-review", "review meeting findings through the dedicated findings command"),
|
|
68
|
+
validation("evidence-findings.stale", "evidence findings changed since they were read; stage a new batch"),
|
|
69
|
+
validation("mail-findings.stale", "mail findings cite mail that changed since it was read; stage a new batch"),
|
|
70
|
+
["mail-findings.not-stored", "not_found", "a mail finding cites an email the store does not hold"],
|
|
71
|
+
validation("mail-findings.partial", "a cited email is not stored whole yet; cite it once it is"),
|
|
72
|
+
validation("evidence-findings.dedicated-review", "review evidence findings through the dedicated findings command"),
|
|
73
|
+
validation("mail-findings.dedicated-review", "review mail findings through the dedicated findings command"),
|
|
74
|
+
validation("mail-findings.invalid", "a checked mail findings batch would be refused; details.problems names why, finding by finding"),
|
|
75
|
+
validation("mail-findings.key-used", "the findings batch key was already used for different input"),
|
|
76
|
+
validation("finding.unknown-field", "a finding has a field its kind does not take"),
|
|
77
|
+
validation("finding.missing-field", "a finding leaves out a field its kind needs"),
|
|
78
|
+
validation("document.changed", "the document changed while it was read; nothing was saved"),
|
|
79
|
+
["document.not-imported", "not_found", "the document is not imported in this source account"],
|
|
80
|
+
["extraction.invalid-proposals", "invalid_response", "the model's memory proposals could not be used"],
|
|
81
|
+
validation("extraction.text-too-long", "the text is too long for memory extraction"),
|
|
82
|
+
validation("file.locked", "another process holds the file's lock"),
|
|
83
|
+
validation("mail.cursor-ahead", "an acknowledge cursor is past the newest stored email"),
|
|
84
|
+
["mail.holder-not-yours", "permission_error", "a run moves only the mark of the holder its schedule names"],
|
|
85
|
+
["mail.no-mark", "not_found", "the holder has no mark in the mailbox yet; its first review starts it"],
|
|
86
|
+
["mail.reset-owner-only", "permission_error", "only the owner moves a holder's mark back"],
|
|
87
|
+
["mail.source-failed", "provider_error", "the mail server refused or did not complete a request"],
|
|
88
|
+
["mail.search-refused", "provider_error", "the mail server refused to search a folder"],
|
|
89
|
+
[
|
|
90
|
+
"mail.attachments-unread",
|
|
91
|
+
"provider_unavailable",
|
|
92
|
+
"the email could not be read again, so its skipped attachments have no text"
|
|
93
|
+
],
|
|
94
|
+
["mirror.partial", "provider_error", "some mirrored files were not synced"],
|
|
95
|
+
["profile.wrong-account", "authentication_error", "the signed-in source account does not match this profile"],
|
|
96
|
+
validation("push.too-many-files", "the folder holds more files than one push takes"),
|
|
97
|
+
validation("push.unreadable", "the folder to push could not be read"),
|
|
98
|
+
validation("spreadsheet.unreadable", "the workbook could not be read"),
|
|
99
|
+
[
|
|
100
|
+
"config.unrepairable",
|
|
101
|
+
"configuration_error",
|
|
102
|
+
"the settings file's damage has more than one reading; nothing was changed, so it is fixed by hand"
|
|
103
|
+
],
|
|
104
|
+
["state.invalid", "configuration_error", "the saved sync state is unreadable or invalid; it is kept, not reset"],
|
|
105
|
+
["sync.partial", "provider_error", "some calendars did not sync; the next sync retries them"],
|
|
106
|
+
validation("event.conflict", "the event changed at the provider since the last sync; sync and try again"),
|
|
107
|
+
validation("event.notify-required", "the event has other attendees; say whether to notify them"),
|
|
108
|
+
validation("remind.window", "--due-within is outside 1m to 1d"),
|
|
109
|
+
validation("remind.running", "another events remind is running; this run did nothing"),
|
|
110
|
+
[
|
|
111
|
+
"remind.hook-failed",
|
|
112
|
+
"configuration_error",
|
|
113
|
+
"the reminder program failed for some events; the next run retries them"
|
|
114
|
+
],
|
|
115
|
+
["sync.failed", "provider_error", "the sync failed; the answer comes from what the store already holds"],
|
|
116
|
+
validation("event.repeat-invalid", "the repeat rule is outside the RFC 5545 subset the calendars take"),
|
|
117
|
+
validation("event.repeat-kind", "the series' rule holds a date or a time of the kind the event is leaving"),
|
|
118
|
+
validation("event.repeat-split", "the series cannot be split at this occurrence, or was split there already"),
|
|
119
|
+
validation("event.repeat-count", "a COUNT series is split only with a rule for its new part"),
|
|
120
|
+
validation("event.unmovable", "the provider keeps this kind of event on its calendar"),
|
|
121
|
+
validation("event.quick-add-ambiguous", "more than one event could be the one a lost quick add made"),
|
|
122
|
+
validation("event.text-with-fields", "--text takes the whole event from its line, so no field option goes with it"),
|
|
123
|
+
validation("calendar.ambiguous", "two or more calendars have this name; name one by its id"),
|
|
124
|
+
validation("export.too-many", "the query finds more events than one export writes"),
|
|
125
|
+
validation("ics.not-icalendar", "the file is not iCalendar"),
|
|
126
|
+
validation("ics.no-events", "the file holds no event that can be imported"),
|
|
127
|
+
validation("ics.too-many", "the file holds more events than one import sends"),
|
|
128
|
+
validation("ics.too-large", "the file is larger than one import reads"),
|
|
129
|
+
["calendar.read-only", "permission_error", "the calendar takes no new events from this account"],
|
|
130
|
+
validation("feed.address-invalid", "a feed address is an http, https or webcal URL with no user or password in it"),
|
|
131
|
+
validation("feed.duplicate", "this profile follows a feed at this address already"),
|
|
132
|
+
validation("feed.not-a-feed", "the calendar is not a feed this profile follows"),
|
|
133
|
+
validation("feed.too-large", "the feed is larger than one sync reads"),
|
|
134
|
+
validation("feed.redirect-refused", "the feed sent the request on to an address that is not https"),
|
|
135
|
+
["feed.no-address", "configuration_error", "the feed's address is no longer kept on this computer"],
|
|
136
|
+
["feed.refused", "provider_error", "the feed's server refused the request"],
|
|
137
|
+
["feed.gone", "not_found", "the feed's server has no feed at this address any more"],
|
|
138
|
+
["feed.timeout", "timeout", "the feed's server did not answer in time"],
|
|
139
|
+
["feed.unreachable", "network_error", "the feed's server could not be reached"],
|
|
140
|
+
validation("busy.feed", "a feed calendar has no busy times to ask; read its events with events list"),
|
|
141
|
+
["calendar.unsynced", "not_found", "the calendar account has no synced calendar in the store"],
|
|
142
|
+
["calendar.sync-incomplete", "not_found", "a synced calendar's sync never finished or is mid-round"],
|
|
143
|
+
["calendar.no-upcoming", "not_found", "no upcoming meeting with other attendees is stored for this account"],
|
|
144
|
+
["chat.not-read", "not_found", "a chat shared with this person is not held whole in the store"],
|
|
145
|
+
["meetings.index-pending", "not_found", "some stored meetings are not indexed by person yet"],
|
|
146
|
+
["profile.locked", "permission_error", "a profile lock pins this process to its own account"],
|
|
147
|
+
["busy.offline", "permission_error", "calendars busy asks the provider; --offline was given"],
|
|
148
|
+
["busy.unanswered", "provider_error", "the provider gave no busy times for a calendar or person that was asked"],
|
|
149
|
+
validation("busy.no-calendars", "no calendar syncs and no person was named, so there is nobody to ask"),
|
|
150
|
+
["search.offline", "permission_error", "search --backend server asks the provider; --offline was given"],
|
|
151
|
+
validation("search.no-calendars", "no calendar of this profile syncs yet, so the provider has nothing to search"),
|
|
152
|
+
validation("search.server-options", "search --backend server takes neither --exact, --cursor nor --newest"),
|
|
153
|
+
validation("search.one-backend", "search answers from one backend at a time: archive or server"),
|
|
154
|
+
["search.server-not-allowed", "permission_error", "the profile does not allow messages.server-search"],
|
|
155
|
+
validation("search.server-no-criteria", "the query has nothing the server can search, so only the store is read"),
|
|
156
|
+
["search.server-unsupported", "provider_error", "this source's server cannot search"],
|
|
157
|
+
["search.server-rate-limited", "rate_limited", "the server refused a search as too many requests"],
|
|
158
|
+
["search.server-failed", "provider_unavailable", "the server did not answer a search"],
|
|
159
|
+
["search.server-timeout", "timeout", "the server did not answer within --server-time"],
|
|
160
|
+
["search.server-capped", "outcome_unknown", "the server found more than one search reads, or a branch was not sent"],
|
|
161
|
+
[
|
|
162
|
+
"search.server-partial",
|
|
163
|
+
"outcome_unknown",
|
|
164
|
+
"a message the server found was stored without its attachments; the next sync reads it whole"
|
|
165
|
+
],
|
|
166
|
+
validation("store.refused", "the local store refused the document text"),
|
|
167
|
+
["store.not-writable", "permission_error", "the message store cannot be written from this process"],
|
|
168
|
+
[
|
|
169
|
+
"store.vector-extension-missing",
|
|
170
|
+
"configuration_error",
|
|
171
|
+
"the install has no sqlite-vec extension for this platform; reinstall the CLI"
|
|
172
|
+
],
|
|
173
|
+
["store.vector-extension-failed", "configuration_error", "the sqlite-vec extension did not load; reinstall the CLI"],
|
|
174
|
+
validation("store.vector-invalid", "a vector to store had a non-finite value"),
|
|
175
|
+
validation("catalog.scope-limit", "the selected catalog exceeds its entry limit"),
|
|
176
|
+
validation("evidence.row-too-large", "one evidence row is over its size limit"),
|
|
177
|
+
validation("index.not-ready", "the search index is still being built"),
|
|
178
|
+
validation("input.closed", "the input closed before the answer"),
|
|
179
|
+
validation("input.required", "the command needs an answer and cannot ask for one"),
|
|
180
|
+
validation("input.too-large", "the input is over its size limit"),
|
|
181
|
+
["meeting-project.stale", "configuration_error", "the meeting's project changed meanwhile"],
|
|
182
|
+
validation("fact.not-accepted", "only an accepted fact can be revoked"),
|
|
183
|
+
validation("fact.owner-written", "the owner wrote this fact; it was never proposed, so it cannot be revoked"),
|
|
184
|
+
validation("fact.payment-retired", "a payment is a payments row in store.finance, not a fact"),
|
|
185
|
+
validation("fact.revoke-correction", "an accepted correction cannot be revoked; its superseded fact stays"),
|
|
186
|
+
validation("finance.allocate", "the invoice or payment cannot take an allocation in its state"),
|
|
187
|
+
validation("finance.currency", "the payment and the invoice are in different currencies; nothing is converted"),
|
|
188
|
+
validation("finance.field", "a field of the invoice or payment is not valid"),
|
|
189
|
+
validation("finance.line-amount", "the line's amount is not its quantity times its unit price"),
|
|
190
|
+
validation("finance.lines", "the invoice's lines are not valid"),
|
|
191
|
+
["finance.not-allocated", "not_found", "the payment is not allocated to that invoice"],
|
|
192
|
+
validation("finance.over-invoice", "the allocation would settle more than the invoice's total"),
|
|
193
|
+
validation("finance.over-payment", "the allocation would use more than the payment's amount"),
|
|
194
|
+
["finance.owner-only", "permission_error", "only the owner does this with money"],
|
|
195
|
+
validation("finance.party", "a party is a person: or organization: reference"),
|
|
196
|
+
validation("finance.ref", "the reference names no invoice or payment"),
|
|
197
|
+
validation("finance.status", "the invoice's status does not allow this"),
|
|
198
|
+
validation("finance.total", "the invoice's total is not the sum of its lines"),
|
|
199
|
+
validation("finance.unallocate", "a rejected or deleted payment's allocations are not taken back"),
|
|
200
|
+
validation("record.entity", "the invoice or payment the record stands for was refused"),
|
|
201
|
+
["record.map-owner-only", "permission_error", "only the owner says which entity a source record is"],
|
|
202
|
+
validation("record.map-type", "a record maps only to an entity of its own type"),
|
|
203
|
+
validation("record.mapped", "the record already stands for another entity"),
|
|
204
|
+
validation("record.over-payment", "the record's settles amounts add up to more than the payment"),
|
|
205
|
+
validation("record.not-found", "the store holds no such record to delete"),
|
|
206
|
+
validation("record.invalid", "a field of the record is not the kind the entity needs"),
|
|
207
|
+
validation("record.reference-not-found", "a reference in the record's fields is not in the store"),
|
|
208
|
+
validation("record.relation-ambiguous", "the record names more than one target for a role that takes one"),
|
|
209
|
+
validation("record.stale-revision", "the store holds a newer revision of the record"),
|
|
210
|
+
validation("memory.evidence-required", "a memory needs its evidence"),
|
|
211
|
+
validation("memory.scope-required", "a memory needs its scope"),
|
|
212
|
+
validation("money.amount", "the amount is not a decimal string in the currency's scale"),
|
|
213
|
+
validation("money.currency", "the currency is not one the store keeps money in"),
|
|
214
|
+
validation("money.quantity", "the quantity is not a decimal above 0"),
|
|
215
|
+
validation("deal.closed", "a won, lost, rejected or deleted deal does not move or close again"),
|
|
216
|
+
validation("deal.field", "a field of the deal is not valid"),
|
|
217
|
+
["deal.owner-only", "permission_error", "only the owner moves or closes a deal, or makes a pipeline"],
|
|
218
|
+
validation("deal.ref", "the reference names no deal"),
|
|
219
|
+
validation("deal.stage", "no stage of that name, or a stage name more than one pipeline has"),
|
|
220
|
+
validation("pipeline.duplicate", "a pipeline of that name is already stored"),
|
|
221
|
+
validation("pipeline.field", "a pipeline needs a name and at least one stage, each named once"),
|
|
222
|
+
["pipeline.not-found", "not_found", "no stored pipeline has that name"],
|
|
223
|
+
validation("order.duplicate", "the shop's order with this number is already stored; change its status instead"),
|
|
224
|
+
validation("order.proposed", "the shop's order with this number already waits for the owner in a findings batch"),
|
|
225
|
+
validation("order.field", "a field of the order is not valid"),
|
|
226
|
+
validation("order.source-url", "an order's source URL is not an http or https address"),
|
|
227
|
+
["order.not-found", "not_found", "no stored order of that shop has that number"],
|
|
228
|
+
validation("order.ref", "the reference names no order, or a shop's number names more than one"),
|
|
229
|
+
validation("order.status", "a rejected or deleted order's status does not change"),
|
|
230
|
+
["model.not-downloaded", "not_found", "the model is not downloaded on this machine"],
|
|
231
|
+
["person.no-owner", "not_found", "no person is marked as the owner in the store"],
|
|
232
|
+
["transcription.no-key", "authentication_error", "no OpenAI key is set for transcription"],
|
|
233
|
+
validation("transcription.too-large", "the audio is over the transcription provider's size limit"),
|
|
234
|
+
[
|
|
235
|
+
"transcription.quota-exhausted",
|
|
236
|
+
"permission_error",
|
|
237
|
+
"the transcription provider account has no credit or limit left"
|
|
238
|
+
],
|
|
239
|
+
validation("name.invalid", "the name is not valid"),
|
|
240
|
+
validation("output.choose-fields", "at a terminal, --json names the fields it prints"),
|
|
241
|
+
validation("output.conflict", "two output switches ask for different output"),
|
|
242
|
+
validation("output.one-object", "a report is one JSON object; --jsonl streams lists only"),
|
|
243
|
+
validation("output.unknown-field", "the answer has no field by that name"),
|
|
244
|
+
validation("name.taken", "the name is already used"),
|
|
245
|
+
validation("period.ambiguous", "the period can be read more than one way"),
|
|
246
|
+
validation("proposal.wrong-state", "the proposal is not in a state that allows this"),
|
|
247
|
+
validation("proposal.reason-required", "an agent deciding for the owner gives a reason"),
|
|
248
|
+
validation("proposal.decider-required", "a decision names who decides: the owner or an agent with a reason"),
|
|
249
|
+
validation("proposal.ids", "the proposal ids cannot be read"),
|
|
250
|
+
["proposal.own", "permission_error", "an agent never decides its own proposal"],
|
|
251
|
+
["proposal.owner-only", "permission_error", "only the owner decides this proposal"],
|
|
252
|
+
["proposals.agent-decisions-off", "permission_error", "agent decisions are turned off; the owner decides"],
|
|
253
|
+
["proposal.unknown-kind", "not_found", "no registered proposal kind holds this id"],
|
|
254
|
+
validation("relationship.exists", "a confirmed relationship already links them"),
|
|
255
|
+
validation("ranking.invalid", "the ranking is not valid"),
|
|
256
|
+
validation("ref.malformed", "the reference has a known kind but not its shape"),
|
|
257
|
+
validation("ref.unknown-kind", "the text names no kind of reference"),
|
|
258
|
+
validation("ref.wrong-kind", "the reference names another kind of thing than the argument takes"),
|
|
259
|
+
validation("ref.wrong-provider", "the reference belongs to another messenger; open it with that CLI"),
|
|
260
|
+
validation("ref.wrong-account", "the reference belongs to another account than this profile's"),
|
|
261
|
+
validation("selection.changed", "the stored selection changed meanwhile"),
|
|
262
|
+
validation("selection.invalid", "the selection is not valid"),
|
|
263
|
+
validation("search.kind", "the saved search belongs to another kind of search: messages or meetings"),
|
|
264
|
+
["selection.out-of-scope", "permission_error", "the selection reaches outside what this profile may read"],
|
|
265
|
+
validation("stemmer.invalid", "the stemmer is not valid for that script"),
|
|
266
|
+
validation("stemmer.newer", "the stems were built by a newer tool"),
|
|
267
|
+
validation("stemmer.unknown", "the store asks for stemmers this tool does not know"),
|
|
268
|
+
validation("tag-review.over-budget", "the tag review is over its budget"),
|
|
269
|
+
validation("tag-review.required", "the tag needs the owner's review first"),
|
|
270
|
+
["tag-review.stale", "configuration_error", "the tag review changed meanwhile"],
|
|
271
|
+
validation("tag.invalid", "the tag is not valid"),
|
|
272
|
+
["reactions.list-hidden", "permission_error", "the chat does not let its members see who reacted"],
|
|
273
|
+
["reactions.broadcast", "permission_error", "a channel does not show who reacted to its posts"],
|
|
274
|
+
validation("task.external-id", "an external id is <service>:<id>, such as avito:4512345678"),
|
|
275
|
+
validation("task.source-url", "a task's source URL is not an http or https address"),
|
|
276
|
+
validation("task.category-unknown", "the category is not in the task category list"),
|
|
277
|
+
validation("task.claimed", "someone else holds the task"),
|
|
278
|
+
validation("task.closed", "the task is already closed"),
|
|
279
|
+
["task.stale", "conflict", "the task changed since it was read; read it again"],
|
|
280
|
+
validation("task.column", "the task beside which it moves is in another column than the status asked for"),
|
|
281
|
+
validation("task.dependency-cycle", "the task would depend on itself"),
|
|
282
|
+
validation("task.is-subtask", "a subtask moves to another project alone only when it is detached from its parent in the same write"),
|
|
283
|
+
validation("task.duplicate-candidates", "open tasks may be the same job: attach to one, or add it as new"),
|
|
284
|
+
validation("task.already-read", "the message was already read for tasks: a read again only updates and closes tasks unless --open-new"),
|
|
285
|
+
validation("task.certainty-required", "an agent closes a task with its certainty, 0 to 1"),
|
|
286
|
+
["task.pair-decided", "permission_error", "the owner already decided the pair; an agent does not change it"],
|
|
287
|
+
validation("task.no-close-suggestion", "the task has no agent's close waiting on the owner"),
|
|
288
|
+
validation("task.merged", "the task was merged into another; use that one"),
|
|
289
|
+
validation("task.not-merged", "the task was not merged into another"),
|
|
290
|
+
["upgrade.install-failed", "provider_error", "the installer failed; the old version stays"],
|
|
291
|
+
["topic.owner-only", "permission_error", "only the owner may use this topic"],
|
|
292
|
+
["vocabulary.alias-conflict", "configuration_error", "two vocabulary entries claim one alias"],
|
|
293
|
+
validation("vocabulary.consolidation-over-budget", "the selected tag dependencies exceed the preview budget"),
|
|
294
|
+
validation("vocabulary.over-byte-budget", "the vocabulary is over its size budget"),
|
|
295
|
+
validation("vocabulary.over-entry-budget", "the vocabulary has too many entries"),
|
|
296
|
+
["vocabulary.stale", "configuration_error", "the vocabulary changed meanwhile"]
|
|
297
|
+
];
|
|
298
|
+
var INPUT_FIELD_REASONS = defineReasons([
|
|
299
|
+
{
|
|
300
|
+
reason: "input.field-conflict",
|
|
301
|
+
code: "validation_error",
|
|
302
|
+
message: "the input fields conflict",
|
|
303
|
+
details: ["fields"]
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
reason: "input.field-unsupported",
|
|
307
|
+
code: "validation_error",
|
|
308
|
+
message: "the input field is not supported",
|
|
309
|
+
details: ["fields"]
|
|
310
|
+
}
|
|
311
|
+
]);
|
|
312
|
+
var REASONS = defineReasons([
|
|
313
|
+
...QUERY_REASONS,
|
|
314
|
+
...INPUT_FIELD_REASONS,
|
|
315
|
+
...[...QUERY, ...SIGN_IN, ...PROVIDER_API, ...OTHERS].map(([reason, code, message]) => ({
|
|
316
|
+
reason,
|
|
317
|
+
code,
|
|
318
|
+
message,
|
|
319
|
+
details: reason === "vocabulary.consolidation-over-budget" ? ["table"] : []
|
|
320
|
+
}))
|
|
321
|
+
]);
|
|
322
|
+
var DETAILS = [
|
|
323
|
+
"contracts",
|
|
324
|
+
"calendars",
|
|
325
|
+
"allowed",
|
|
326
|
+
"alternative",
|
|
327
|
+
"arguments",
|
|
328
|
+
"at",
|
|
329
|
+
"available",
|
|
330
|
+
"batch",
|
|
331
|
+
"budget",
|
|
332
|
+
"built",
|
|
333
|
+
"candidates",
|
|
334
|
+
"chat",
|
|
335
|
+
"chat_id",
|
|
336
|
+
"cli",
|
|
337
|
+
"column",
|
|
338
|
+
"complete",
|
|
339
|
+
"emitted_bytes",
|
|
340
|
+
"exact",
|
|
341
|
+
"file",
|
|
342
|
+
"forum",
|
|
343
|
+
"guide",
|
|
344
|
+
"hint",
|
|
345
|
+
"id",
|
|
346
|
+
"index",
|
|
347
|
+
"kind",
|
|
348
|
+
"limit",
|
|
349
|
+
"limit_source",
|
|
350
|
+
"line",
|
|
351
|
+
"max_bytes",
|
|
352
|
+
"model",
|
|
353
|
+
"name",
|
|
354
|
+
"operation_id",
|
|
355
|
+
"operation_ids",
|
|
356
|
+
"text_limit",
|
|
357
|
+
"store_refused_in",
|
|
358
|
+
"partial_output",
|
|
359
|
+
"parent",
|
|
360
|
+
"path",
|
|
361
|
+
"permission",
|
|
362
|
+
"person_ids",
|
|
363
|
+
"previous_chat_id",
|
|
364
|
+
"profiles",
|
|
365
|
+
"provider_error",
|
|
366
|
+
"provider",
|
|
367
|
+
"recovery",
|
|
368
|
+
"reference",
|
|
369
|
+
"remembered",
|
|
370
|
+
"retry_at",
|
|
371
|
+
"retry_after_ms",
|
|
372
|
+
"runtime",
|
|
373
|
+
"saved",
|
|
374
|
+
"scheduled_for",
|
|
375
|
+
"script",
|
|
376
|
+
"sent",
|
|
377
|
+
"sent_count",
|
|
378
|
+
"settlement_failed",
|
|
379
|
+
"span",
|
|
380
|
+
"sqlite",
|
|
381
|
+
"stage",
|
|
382
|
+
"standing",
|
|
383
|
+
"state",
|
|
384
|
+
"stderr",
|
|
385
|
+
"term",
|
|
386
|
+
"total",
|
|
387
|
+
"upgraded",
|
|
388
|
+
"wanted"
|
|
389
|
+
];
|
|
390
|
+
var SHARED = { reasons: REASONS, details: DETAILS };
|
|
391
|
+
var merged = /* @__PURE__ */ new WeakMap();
|
|
392
|
+
var failureContext = /* @__PURE__ */ __name((errors) => {
|
|
393
|
+
if (!errors)
|
|
394
|
+
return SHARED;
|
|
395
|
+
const known = merged.get(errors);
|
|
396
|
+
if (known)
|
|
397
|
+
return known;
|
|
398
|
+
const unnamed = (errors.details ?? []).filter((key) => !/^[a-z][a-z0-9]*(_[a-z0-9]+)*$/.test(key));
|
|
399
|
+
if (unnamed.length > 0)
|
|
400
|
+
throw new Error(`error details must be snake_case: ${unnamed.join(", ")}`);
|
|
401
|
+
const context = {
|
|
402
|
+
reasons: defineReasons([...REASONS, ...errors.reasons ?? []]),
|
|
403
|
+
details: [.../* @__PURE__ */ new Set([...DETAILS, ...errors.details ?? []])]
|
|
404
|
+
};
|
|
405
|
+
merged.set(errors, context);
|
|
406
|
+
return context;
|
|
407
|
+
}, "failureContext");
|
|
408
|
+
|
|
409
|
+
export {
|
|
410
|
+
INPUT_FIELD_REASONS,
|
|
411
|
+
REASONS,
|
|
412
|
+
failureContext
|
|
413
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
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.586.0_@wirecat+cli-base@0.79.0_commander@15.0.0_esbuild@0.28.2_type_bdecddef0ae5a50ae90cab8b9e35c13b/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
|
|
8
|
+
import { PassThrough, Writable } from "node:stream";
|
|
9
|
+
var lineReader = /* @__PURE__ */ __name((onMessage) => {
|
|
10
|
+
let rest = "";
|
|
11
|
+
return (chunk) => {
|
|
12
|
+
const lines = (rest + chunk.toString()).split("\n");
|
|
13
|
+
rest = lines.pop() ?? "";
|
|
14
|
+
for (const line of lines) {
|
|
15
|
+
try {
|
|
16
|
+
const message = JSON.parse(line);
|
|
17
|
+
if (message !== null && typeof message === "object")
|
|
18
|
+
onMessage(message);
|
|
19
|
+
} catch {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}, "lineReader");
|
|
24
|
+
var answeredWire = /* @__PURE__ */ __name((source, sink) => {
|
|
25
|
+
const asked = /* @__PURE__ */ new Set();
|
|
26
|
+
let settle;
|
|
27
|
+
const input = new PassThrough();
|
|
28
|
+
const onData = lineReader(({ id, method }) => {
|
|
29
|
+
if (id !== void 0 && typeof method === "string")
|
|
30
|
+
asked.add(JSON.stringify(id));
|
|
31
|
+
});
|
|
32
|
+
const output = new Writable({
|
|
33
|
+
write: /* @__PURE__ */ __name((chunk, _encoding, done) => {
|
|
34
|
+
noteAnswer(chunk);
|
|
35
|
+
sink.write(chunk, done);
|
|
36
|
+
}, "write")
|
|
37
|
+
});
|
|
38
|
+
const noteAnswer = lineReader(({ id, method }) => {
|
|
39
|
+
if (id === void 0 || method !== void 0)
|
|
40
|
+
return;
|
|
41
|
+
asked.delete(JSON.stringify(id));
|
|
42
|
+
if (asked.size === 0)
|
|
43
|
+
settle?.();
|
|
44
|
+
});
|
|
45
|
+
const forward = /* @__PURE__ */ __name((chunk) => {
|
|
46
|
+
onData(chunk);
|
|
47
|
+
input.write(chunk);
|
|
48
|
+
}, "forward");
|
|
49
|
+
source.on("data", forward);
|
|
50
|
+
const ended = new Promise((resolve) => {
|
|
51
|
+
source.once("end", resolve);
|
|
52
|
+
source.once("close", resolve);
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
input,
|
|
56
|
+
output,
|
|
57
|
+
ended,
|
|
58
|
+
answered: /* @__PURE__ */ __name(() => new Promise((resolve) => {
|
|
59
|
+
if (asked.size === 0)
|
|
60
|
+
resolve();
|
|
61
|
+
else
|
|
62
|
+
settle = resolve;
|
|
63
|
+
}), "answered"),
|
|
64
|
+
/** Lets go of the real stdin, so it no longer holds the process open. */
|
|
65
|
+
release: /* @__PURE__ */ __name(() => {
|
|
66
|
+
source.off("data", forward);
|
|
67
|
+
if (source.listenerCount("data") === 0)
|
|
68
|
+
source.pause();
|
|
69
|
+
input.end();
|
|
70
|
+
}, "release")
|
|
71
|
+
};
|
|
72
|
+
}, "answeredWire");
|
|
73
|
+
|
|
74
|
+
export {
|
|
75
|
+
answeredWire
|
|
76
|
+
};
|