@wirecat/zoom-cli 0.65.0 → 0.66.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.
Files changed (130) hide show
  1. package/dist/bin/zm.js +2 -2
  2. package/dist/bin/zm.js.map +1 -1
  3. package/dist/bundle/{all-profiles-SKMLZJSY.js → all-profiles-D5CFH2OK.js} +8 -5
  4. package/dist/bundle/answer-policy-YAYMKRRD.js +101 -0
  5. package/dist/bundle/{anthropic-TVHK7CY2.js → anthropic-K2E2JS4S.js} +6 -3
  6. package/dist/bundle/{app-server-44ASFH47.js → app-server-TVXDG6HZ.js} +60 -54
  7. package/dist/bundle/{bun-sqlite-NS32GMM4.js → bun-sqlite-HGBEHQI3.js} +5 -2
  8. package/dist/bundle/{chunk-CVCRQW3A.js → chunk-2T5BOLBS.js} +1 -1
  9. package/dist/bundle/{chunk-XJQB47IL.js → chunk-2VPHQFO5.js} +5 -5
  10. package/dist/bundle/{chunk-MRWIXUYT.js → chunk-2YLNUZ3T.js} +5 -3
  11. package/dist/bundle/{chunk-SQWRZZOQ.js → chunk-3B7L2UX4.js} +2 -2
  12. package/dist/bundle/{chunk-ZREFYKUB.js → chunk-3WTKZ2ZS.js} +9 -7
  13. package/dist/bundle/{chunk-GBZF4IIP.js → chunk-3Y2F65AY.js} +2 -2
  14. package/dist/bundle/{chunk-25IDWPEN.js → chunk-5A26IBAR.js} +19 -15
  15. package/dist/bundle/{chunk-5NGOP4EZ.js → chunk-5GD2XZ6X.js} +21 -19
  16. package/dist/bundle/{chunk-OXUHTKO2.js → chunk-5HPALDUO.js} +1 -1
  17. package/dist/bundle/{chunk-QI7BZS2G.js → chunk-62GOOZO3.js} +3 -3
  18. package/dist/bundle/{chunk-UMHJZWZU.js → chunk-67RNZGAG.js} +6 -4
  19. package/dist/bundle/{chunk-Z5424QL6.js → chunk-6GSJLNP4.js} +1 -1
  20. package/dist/bundle/{chunk-ERPRAYA7.js → chunk-6TIKPRVQ.js} +8 -4
  21. package/dist/bundle/{chunk-UPJXN2CO.js → chunk-756RS4PH.js} +146 -138
  22. package/dist/bundle/{chunk-KYLS5QGC.js → chunk-7JMBEPW2.js} +1 -1
  23. package/dist/bundle/{chunk-MZ6U6HNJ.js → chunk-7KCTPGOF.js} +1 -1
  24. package/dist/bundle/{chunk-VJTGYBJJ.js → chunk-7PF56S6U.js} +21 -15
  25. package/dist/bundle/{chunk-6CS7ETBK.js → chunk-A2SCXNA7.js} +48 -42
  26. package/dist/bundle/{chunk-AMMD6YCJ.js → chunk-AU4JHT3R.js} +1 -1
  27. package/dist/bundle/{chunk-T3KICUOK.js → chunk-AZ7ICKIA.js} +4 -4
  28. package/dist/bundle/{chunk-EA63UGWE.js → chunk-BXSAROQP.js} +2 -2
  29. package/dist/bundle/{chunk-MPKKIL3U.js → chunk-CAW6IMFZ.js} +19 -15
  30. package/dist/bundle/{chunk-DNCKH7CO.js → chunk-CR4CXOLX.js} +6 -6
  31. package/dist/bundle/{chunk-QLCYAQ66.js → chunk-CZ4KLUJG.js} +1 -1
  32. package/dist/bundle/{chunk-LPUFOWL3.js → chunk-D72URWJE.js} +1 -39
  33. package/dist/bundle/{chunk-BNXH73OU.js → chunk-EXXM4RNI.js} +10 -8
  34. package/dist/bundle/{chunk-24F7JBLY.js → chunk-FWFFQV4D.js} +2 -2
  35. package/dist/bundle/{chunk-ZOGYTDHG.js → chunk-GHAPWKG2.js} +4 -2
  36. package/dist/bundle/{chunk-GEX4V5TM.js → chunk-GI6QVSCW.js} +3 -3
  37. package/dist/bundle/{chunk-MH7AWCB4.js → chunk-GKXFL35E.js} +40 -36
  38. package/dist/bundle/{chunk-ZFNM3FNI.js → chunk-GNGBG5BT.js} +17 -13
  39. package/dist/bundle/{chunk-BWRBALXG.js → chunk-H5ZVZAOD.js} +1 -1
  40. package/dist/bundle/{chunk-TUIEDVI6.js → chunk-HKQWV3KT.js} +4 -2
  41. package/dist/bundle/chunk-IDWHJ35K.js +166 -0
  42. package/dist/bundle/{chunk-GXCNCMUY.js → chunk-IKQ73INC.js} +45 -41
  43. package/dist/bundle/chunk-ILHTNOIV.js +23 -0
  44. package/dist/bundle/{chunk-KZE3G4ZT.js → chunk-J4EZL6HY.js} +49 -45
  45. package/dist/bundle/{chunk-VW2SW7ME.js → chunk-JX3V35A5.js} +2 -2
  46. package/dist/bundle/{chunk-RZLNHNSS.js → chunk-K5CIN4JP.js} +1 -1
  47. package/dist/bundle/{chunk-ZXGRK44F.js → chunk-KDKFGQWG.js} +9 -7
  48. package/dist/bundle/{chunk-A6OA2EH2.js → chunk-L7IK4FOA.js} +1 -1
  49. package/dist/bundle/{chunk-TC7PD3LH.js → chunk-LN2S3RA3.js} +1 -1
  50. package/dist/bundle/{chunk-LOL6JYYN.js → chunk-N5JRRBEG.js} +5 -3
  51. package/dist/bundle/chunk-N67BLTBV.js +2443 -0
  52. package/dist/bundle/{chunk-2H5SXK7K.js → chunk-N6JMJN5A.js} +10 -8
  53. package/dist/bundle/{chunk-FYJL276J.js → chunk-NMQUCHTX.js} +2 -2
  54. package/dist/bundle/{chunk-C6BG57FA.js → chunk-O5FKJV3T.js} +13 -11
  55. package/dist/bundle/{chunk-PV3UDPCI.js → chunk-P2G4KGTR.js} +15 -9
  56. package/dist/bundle/{chunk-VH4F2EK4.js → chunk-P2SYZNM4.js} +1 -1
  57. package/dist/bundle/{chunk-U5ASRBBF.js → chunk-P3XVLHIQ.js} +2 -2
  58. package/dist/bundle/chunk-PQLBPYJR.js +46 -0
  59. package/dist/bundle/{chunk-GMTXCFI7.js → chunk-Q47C3QZW.js} +9 -5
  60. package/dist/bundle/{chunk-CNEE6TPE.js → chunk-QAPU2JNO.js} +1 -1
  61. package/dist/bundle/{chunk-3CZIWGZ6.js → chunk-QJHRYUMJ.js} +1 -1
  62. package/dist/bundle/{chunk-FYM27FCG.js → chunk-QV5ZGRK3.js} +10 -4
  63. package/dist/bundle/{chunk-UKU6MYUI.js → chunk-RMKHYUHK.js} +8 -19
  64. package/dist/bundle/{chunk-M6IDHQ7N.js → chunk-RO44LANT.js} +85 -79
  65. package/dist/bundle/chunk-S6S3KVJI.js +45 -0
  66. package/dist/bundle/{chunk-ZH743WNV.js → chunk-SU4WPBQE.js} +5 -3
  67. package/dist/bundle/{chunk-JF7ZEUXU.js → chunk-TFDVFD4N.js} +72 -2535
  68. package/dist/bundle/{chunk-NNNEVWFF.js → chunk-TMVKZMDO.js} +22 -18
  69. package/dist/bundle/{chunk-R5BAF5XE.js → chunk-TN7K66PU.js} +1 -1
  70. package/dist/bundle/{chunk-MIB5X2XW.js → chunk-TUEEXECZ.js} +4 -4
  71. package/dist/bundle/{chunk-K6ATTKQR.js → chunk-UOIXBEFR.js} +4 -4
  72. package/dist/bundle/chunk-UYV2JGLQ.js +34 -0
  73. package/dist/bundle/{chunk-NJSIHMAE.js → chunk-XFUID5NY.js} +3 -3
  74. package/dist/bundle/{chunk-266WOOB3.js → chunk-XWDSEJWP.js} +3 -3
  75. package/dist/bundle/{chunk-37PHGASE.js → chunk-YLEQN6PB.js} +5 -3
  76. package/dist/bundle/{chunk-WLSF3GCC.js → chunk-Z6U3MEGJ.js} +1 -1
  77. package/dist/bundle/{chunk-DYJXAY7Q.js → chunk-ZKTXUDSR.js} +31 -27
  78. package/dist/bundle/{chunk-H7762LDA.js → chunk-ZNFPDTQM.js} +1 -1
  79. package/dist/bundle/{chunk-IPTI3Y2E.js → chunk-ZTL7ANSG.js} +6 -4
  80. package/dist/bundle/{cli-FDO6CP6R.js → cli-HWQIL2AC.js} +71 -66
  81. package/dist/bundle/command-contract-CQFJXWX6.js +40 -0
  82. package/dist/bundle/config-R2Y6ZVQS.js +83 -0
  83. package/dist/bundle/{decode-7SZI3TGZ.js → decode-XPAPPUGE.js} +6 -3
  84. package/dist/bundle/dispatch-AKVJGP2S.js +412 -0
  85. package/dist/bundle/{dist-5GWUXW27.js → dist-LDIUQBM7.js} +18 -15
  86. package/dist/bundle/{embed-24YSXHLP.js → embed-LK45GRQ7.js} +7 -4
  87. package/dist/bundle/{embedder-MEXN2TFB.js → embedder-QPBC5XBY.js} +9 -6
  88. package/dist/bundle/failure-7OULAOWQ.js +25 -0
  89. package/dist/bundle/first-run-J5FG773Q.js +28 -0
  90. package/dist/bundle/first-screen-MULOBUHN.js +38 -0
  91. package/dist/bundle/{folders-DBAAMU26.js → folders-RHPUVMDI.js} +5 -2
  92. package/dist/bundle/{main-EIUCXXDW.js → main-FJHE5YHU.js} +28 -23
  93. package/dist/bundle/{mcp-FUSDPAOL.js → mcp-MNI62HHE.js} +4 -2
  94. package/dist/bundle/{meetings-JDTRGXZJ.js → meetings-MYIDGYGW.js} +6 -3
  95. package/dist/bundle/{node-sqlite-O4BAODFR.js → node-sqlite-SYZUTVPC.js} +5 -2
  96. package/dist/bundle/{oauth-3YLHXGUW.js → oauth-QPS5VTN6.js} +7 -4
  97. package/dist/bundle/{open-QGRMSNM2.js → open-OVCASRSJ.js} +5 -2
  98. package/dist/bundle/openai-VEVT7D7L.js +25 -0
  99. package/dist/bundle/{output-file-J26UQKRA.js → output-file-K5JEL33Z.js} +7 -4
  100. package/dist/bundle/{program-47DT7SHE.js → program-A546WC4F.js} +106 -98
  101. package/dist/bundle/{prompt-IUD7HCDC.js → prompt-CYBKP7S5.js} +6 -3
  102. package/dist/bundle/{recognize-DMJJHHXF.js → recognize-3H3YDCFI.js} +5 -2
  103. package/dist/bundle/{remote-5WFSOVVB.js → remote-VAYVTJBS.js} +8 -5
  104. package/dist/bundle/{rerank-UKQ65ECH.js → rerank-XA4GA5PS.js} +7 -4
  105. package/dist/bundle/{run-log-UGYL6NW2.js → run-log-XAFHMI3F.js} +53 -48
  106. package/dist/bundle/{serve-WAOSED3I.js → serve-KGHEDUHB.js} +13 -10
  107. package/dist/bundle/server-IDNSJXF3.js +71 -0
  108. package/dist/bundle/{server-NWZFNXC5.js → server-ZYTSMDTP.js} +41 -36
  109. package/dist/bundle/{services-VPANRE72.js → services-ZHMZC2OQ.js} +30 -25
  110. package/dist/bundle/{speech-O6UNUDRW.js → speech-7CJEFKM3.js} +14 -11
  111. package/dist/bundle/{state-BNE7I65A.js → state-U6KSYVOH.js} +6 -3
  112. package/dist/bundle/{store-QQH4FJXJ.js → store-DJE3LAEG.js} +14 -11
  113. package/dist/bundle/{store-4IIVSCJ4.js → store-WS4CQGYU.js} +16 -13
  114. package/dist/bundle/store-connection-T5WGOOPH.js +81 -0
  115. package/dist/bundle/store-maintenance-command-5CBQCEQQ.js +61 -0
  116. package/dist/bundle/{streaming-S4EZB6P2.js → streaming-QMHH7L6N.js} +7 -4
  117. package/dist/bundle/{tokens-VCXIH7WZ.js → tokens-PWQ56OXO.js} +7 -4
  118. package/dist/bundle/zm.js +150 -1
  119. package/dist/version.d.ts +1 -1
  120. package/dist/version.js +1 -1
  121. package/package.json +3 -2
  122. package/dist/bundle/answer-policy-BHDNSJWX.js +0 -96
  123. package/dist/bundle/command-contract-O4FDXM4U.js +0 -37
  124. package/dist/bundle/config-UBHKZG3J.js +0 -78
  125. package/dist/bundle/first-run-OCVEJH63.js +0 -23
  126. package/dist/bundle/first-screen-KJIU25MH.js +0 -35
  127. package/dist/bundle/openai-7PSCSTH7.js +0 -22
  128. package/dist/bundle/server-HAXN772R.js +0 -66
  129. package/dist/bundle/store-connection-PPEQK2K3.js +0 -76
  130. package/dist/bundle/store-maintenance-command-JZXCT6NY.js +0 -56
@@ -7,22 +7,22 @@ import {
7
7
  refuseLocalWrite,
8
8
  refuseUnknownPermissionKeys,
9
9
  sendsPathFor
10
- } from "./chunk-5NGOP4EZ.js";
10
+ } from "./chunk-5GD2XZ6X.js";
11
11
  import {
12
12
  chatRef,
13
13
  contactRef,
14
14
  positiveCount
15
- } from "./chunk-2H5SXK7K.js";
15
+ } from "./chunk-N6JMJN5A.js";
16
16
  import {
17
17
  MAX_SEARCH_OFFSET,
18
18
  excerpt,
19
19
  newOperationId,
20
20
  refreshedFiles,
21
21
  senderIsMe
22
- } from "./chunk-M6IDHQ7N.js";
22
+ } from "./chunk-RO44LANT.js";
23
23
  import {
24
24
  commandPathOf
25
- } from "./chunk-IPTI3Y2E.js";
25
+ } from "./chunk-ZTL7ANSG.js";
26
26
  import {
27
27
  NONE_NAMED,
28
28
  changesMessenger,
@@ -33,44 +33,48 @@ import {
33
33
  nextStep,
34
34
  recalledAccount,
35
35
  settingsFor
36
- } from "./chunk-6CS7ETBK.js";
36
+ } from "./chunk-A2SCXNA7.js";
37
37
  import {
38
38
  MESSENGER_CHANGE_REFUSAL,
39
39
  readOnlyLockOf,
40
40
  readOnlyRefusal
41
- } from "./chunk-WLSF3GCC.js";
41
+ } from "./chunk-Z6U3MEGJ.js";
42
42
  import {
43
43
  DEFAULT_TEXT_MODEL,
44
44
  parseDuration
45
- } from "./chunk-25IDWPEN.js";
45
+ } from "./chunk-5A26IBAR.js";
46
46
  import {
47
47
  CEILING_KEY,
48
48
  keyForCommand,
49
49
  levelFor,
50
50
  writeOfKey
51
- } from "./chunk-OXUHTKO2.js";
51
+ } from "./chunk-5HPALDUO.js";
52
52
  import {
53
53
  hitFiles,
54
54
  openStore
55
- } from "./chunk-GXCNCMUY.js";
55
+ } from "./chunk-IKQ73INC.js";
56
56
  import {
57
57
  formatLocator,
58
58
  parseLocator
59
- } from "./chunk-LOL6JYYN.js";
59
+ } from "./chunk-N5JRRBEG.js";
60
60
  import {
61
- CliError,
62
61
  description,
63
62
  object,
64
63
  optional,
65
64
  pipe,
66
65
  string,
67
66
  toStandardJsonSchema,
68
- visibleControls,
69
67
  writes
70
- } from "./chunk-JF7ZEUXU.js";
68
+ } from "./chunk-N67BLTBV.js";
71
69
  import {
72
70
  importFrom
73
71
  } from "./chunk-Y5E2WNWB.js";
72
+ import {
73
+ CliError
74
+ } from "./chunk-S6S3KVJI.js";
75
+ import {
76
+ visibleControls
77
+ } from "./chunk-UYV2JGLQ.js";
74
78
  import {
75
79
  __name
76
80
  } from "./chunk-ZVVMGPBJ.js";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  resolvePaths,
8
8
  writeSecurely
9
- } from "./chunk-JF7ZEUXU.js";
9
+ } from "./chunk-TFDVFD4N.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
@@ -1,9 +1,11 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
- CliError,
4
+ CliError
5
+ } from "./chunk-S6S3KVJI.js";
6
+ import {
5
7
  singleLine
6
- } from "./chunk-JF7ZEUXU.js";
8
+ } from "./chunk-UYV2JGLQ.js";
7
9
  import {
8
10
  __name
9
11
  } from "./chunk-ZVVMGPBJ.js";
@@ -0,0 +1,166 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ singleLine
5
+ } from "./chunk-UYV2JGLQ.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
11
+ var FIRST_PARTY_TOOLS = [
12
+ { name: "tg", package: "@wirecat/tg-cli" },
13
+ { name: "max", package: "@wirecat/max-cli" },
14
+ { name: "wa", package: "@wirecat/whatsapp-cli" },
15
+ { name: "zm", package: "@wirecat/zoom-cli" },
16
+ { name: "drive", package: "@wirecat/drive-cli" },
17
+ { name: "memo", package: "@wirecat/cli-memo" },
18
+ { name: "mail", package: "@wirecat/mail-cli" },
19
+ // memo reads email today; the name is held for a tool of its own.
20
+ { name: "email" }
21
+ ];
22
+ var BUILT_IN_COMMANDS = ["help", "version", "shortcuts", "doctor", "update", "upgrade", "app"];
23
+ var RESERVED_NAMES = [
24
+ ...FIRST_PARTY_TOOLS.map((tool) => tool.name),
25
+ ...BUILT_IN_COMMANDS,
26
+ "wcat"
27
+ ];
28
+ var TOOL_NAME = /^[a-z][a-z0-9-]{0,39}$/;
29
+ var PROGRAM_PREFIX = "wcat-";
30
+ var DESCRIBE_FLAG = "--wcat-describe";
31
+ var DISPATCH_FLAG = "--wcat-dispatch";
32
+
33
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
34
+ var DESCRIBE_FORMAT = 1;
35
+ var describeAnswer = /* @__PURE__ */ __name((tool) => ({
36
+ wcat_describe: DESCRIBE_FORMAT,
37
+ name: tool.command,
38
+ version: tool.version,
39
+ description: tool.description,
40
+ ...tool.docs ? { docs_url: tool.docs } : {}
41
+ }), "describeAnswer");
42
+ var MAX_TEXT = 200;
43
+ var clean = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? singleLine(value.trim()).slice(0, MAX_TEXT) : void 0, "clean");
44
+ var parseDescribe = /* @__PURE__ */ __name((text) => {
45
+ let answer;
46
+ try {
47
+ answer = JSON.parse(text);
48
+ } catch {
49
+ return void 0;
50
+ }
51
+ if (typeof answer !== "object" || answer === null || !("wcat_describe" in answer))
52
+ return void 0;
53
+ const { version, description, docs_url: docs } = answer;
54
+ const url = clean(docs);
55
+ return {
56
+ version: clean(version) ?? "",
57
+ description: clean(description) ?? "",
58
+ ...url && /^https?:\/\//.test(url) ? { docs: url } : {}
59
+ };
60
+ }, "parseDescribe");
61
+
62
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
63
+ import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
64
+ import { join } from "node:path";
65
+ var SHIM_FORMAT = 1;
66
+ var MARK = /^(?:#|REM) wirecat-shim (\d+) (launcher|shortcut) (\S+)\r?$/m;
67
+ var NOTE = {
68
+ launcher: "Written by @wirecat/cli-base. Any WireCat tool rewrites it when it breaks; it is safe to delete.",
69
+ shortcut: "Made by `wcat shortcuts add`; `wcat shortcuts remove` takes it out."
70
+ };
71
+ var shellQuote = /* @__PURE__ */ __name((text) => `'${text.replaceAll("'", `'\\''`)}'`, "shellQuote");
72
+ var shimFiles = /* @__PURE__ */ __name((kind, { dir, name, target, platform }) => {
73
+ const mark = `wirecat-shim ${SHIM_FORMAT} ${kind} ${target}`;
74
+ const extra = kind === "launcher" ? ` ${DISPATCH_FLAG}` : "";
75
+ if (platform !== "win32")
76
+ return [
77
+ {
78
+ path: join(dir, name),
79
+ text: `#!/bin/sh
80
+ # ${mark}
81
+ # ${NOTE[kind]}
82
+ exec ${shellQuote(join(dir, target))}${extra} "$@"
83
+ `
84
+ }
85
+ ];
86
+ return [
87
+ {
88
+ path: join(dir, `${name}.cmd`),
89
+ text: ["@ECHO off", `REM ${mark}`, `REM ${NOTE[kind]}`, `"%~dp0${target}"${extra} %*`, ""].join("\r\n")
90
+ },
91
+ {
92
+ path: join(dir, `${name}.ps1`),
93
+ text: [
94
+ `# ${mark}`,
95
+ `# ${NOTE[kind]}`,
96
+ // PowerShell hands a .cmd its arguments unquoted, so `a&b` would run `b`; npm and pnpm write a .ps1 beside
97
+ // their .cmd, and it is started instead whenever it is there.
98
+ `$stem = Join-Path $PSScriptRoot "${target.replace(/\.(cmd|exe|bat)$/i, "")}"`,
99
+ `$target = if (Test-Path -LiteralPath "$stem.ps1") { "$stem.ps1" } else { Join-Path $PSScriptRoot "${target}" }`,
100
+ "if ($MyInvocation.ExpectingInput) {",
101
+ ` $input | & $target${extra} @args`,
102
+ "} else {",
103
+ ` & $target${extra} @args`,
104
+ "}",
105
+ "exit $LASTEXITCODE",
106
+ ""
107
+ ].join("\r\n")
108
+ }
109
+ ];
110
+ }, "shimFiles");
111
+ var parseShim = /* @__PURE__ */ __name((text) => {
112
+ const found = MARK.exec(text.split("\n", 3).join("\n"));
113
+ if (!found)
114
+ return void 0;
115
+ return { format: Number(found[1]), kind: found[2], target: found[3] };
116
+ }, "parseShim");
117
+ var MAX_SHIM_BYTES = 4096;
118
+ var fileState = /* @__PURE__ */ __name((path) => {
119
+ let stat;
120
+ try {
121
+ stat = lstatSync(path);
122
+ } catch (error) {
123
+ return error.code === "ENOENT" ? { state: "missing" } : { state: "foreign" };
124
+ }
125
+ if (!stat.isFile() || stat.size > MAX_SHIM_BYTES)
126
+ return { state: "foreign" };
127
+ try {
128
+ const text = readFileSync(path, "utf8");
129
+ const mark = parseShim(text);
130
+ return mark ? { state: "ours", mark, text } : { state: "foreign" };
131
+ } catch {
132
+ return { state: "foreign" };
133
+ }
134
+ }, "fileState");
135
+ var exists = /* @__PURE__ */ __name((path) => {
136
+ try {
137
+ return statSync(path).isFile();
138
+ } catch {
139
+ return false;
140
+ }
141
+ }, "exists");
142
+ var writeShim = /* @__PURE__ */ __name(({ path, text }) => {
143
+ const temporary = `${path}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
144
+ try {
145
+ writeFileSync(temporary, text, { mode: 493 });
146
+ renameSync(temporary, path);
147
+ } finally {
148
+ rmSync(temporary, { force: true });
149
+ }
150
+ }, "writeShim");
151
+
152
+ export {
153
+ describeAnswer,
154
+ parseDescribe,
155
+ FIRST_PARTY_TOOLS,
156
+ BUILT_IN_COMMANDS,
157
+ TOOL_NAME,
158
+ PROGRAM_PREFIX,
159
+ DESCRIBE_FLAG,
160
+ DISPATCH_FLAG,
161
+ SHIM_FORMAT,
162
+ shimFiles,
163
+ fileState,
164
+ exists,
165
+ writeShim
166
+ };
@@ -1,27 +1,5 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
- import {
4
- FACT_STATUSES,
5
- LINK_KINDS,
6
- LINK_ORIGINS,
7
- MEMORY_KINDS,
8
- MEMORY_SCOPES,
9
- PRIORITY_LABELS,
10
- RELATION_KINDS,
11
- TASK_KINDS,
12
- TASK_ORIGINS,
13
- TASK_STATES,
14
- TASK_TYPES,
15
- TASK_VERDICTS,
16
- WORK_TASK_TYPES,
17
- checkedScore,
18
- isClosedState,
19
- legacyPriority,
20
- linkKind,
21
- matches,
22
- priorityBand,
23
- priorityLabel
24
- } from "./chunk-AMMD6YCJ.js";
25
3
  import {
26
4
  DEFAULT_STEMMERS,
27
5
  DEFAULT_STEMMERS_VERSION,
@@ -34,13 +12,7 @@ import {
34
12
  fold,
35
13
  normalize,
36
14
  parseStemmers
37
- } from "./chunk-RZLNHNSS.js";
38
- import {
39
- DEFAULT_TASK_CATEGORIES,
40
- sharedConfigPath,
41
- storedTaskCategories,
42
- taskCategoriesReader
43
- } from "./chunk-ERPRAYA7.js";
15
+ } from "./chunk-K5CIN4JP.js";
44
16
  import {
45
17
  COUNTER_FIELDS,
46
18
  DOCUMENT_ACCOUNT_PROVIDERS,
@@ -73,18 +45,46 @@ import {
73
45
  rankingWords,
74
46
  useStoredProviders,
75
47
  validCounter
76
- } from "./chunk-LOL6JYYN.js";
48
+ } from "./chunk-N5JRRBEG.js";
49
+ import {
50
+ FACT_STATUSES,
51
+ LINK_KINDS,
52
+ LINK_ORIGINS,
53
+ MEMORY_KINDS,
54
+ MEMORY_SCOPES,
55
+ PRIORITY_LABELS,
56
+ RELATION_KINDS,
57
+ TASK_KINDS,
58
+ TASK_ORIGINS,
59
+ TASK_STATES,
60
+ TASK_TYPES,
61
+ TASK_VERDICTS,
62
+ WORK_TASK_TYPES,
63
+ checkedScore,
64
+ isClosedState,
65
+ legacyPriority,
66
+ linkKind,
67
+ matches,
68
+ priorityBand,
69
+ priorityLabel
70
+ } from "./chunk-AU4JHT3R.js";
71
+ import {
72
+ DEFAULT_TASK_CATEGORIES,
73
+ sharedConfigPath,
74
+ storedTaskCategories,
75
+ taskCategoriesReader
76
+ } from "./chunk-6TIKPRVQ.js";
77
77
  import {
78
78
  normalizeTag,
79
79
  tagOf
80
- } from "./chunk-TUIEDVI6.js";
80
+ } from "./chunk-HKQWV3KT.js";
81
81
  import {
82
82
  storePath
83
- } from "./chunk-A6OA2EH2.js";
83
+ } from "./chunk-L7IK4FOA.js";
84
84
  import {
85
85
  quietSqliteWarning,
86
86
  storeCapable
87
- } from "./chunk-QI7BZS2G.js";
87
+ } from "./chunk-62GOOZO3.js";
88
88
  import {
89
89
  PRAGMAS,
90
90
  TIME_LIMIT_FUNCTION,
@@ -120,7 +120,7 @@ import {
120
120
  validateMeetingRelatedHistory,
121
121
  validateMeetingSeriesHistory,
122
122
  validatePayment
123
- } from "./chunk-GMTXCFI7.js";
123
+ } from "./chunk-Q47C3QZW.js";
124
124
  import {
125
125
  OPERATORS_BY_TYPE,
126
126
  QUERY_LIMITS,
@@ -133,12 +133,10 @@ import {
133
133
  validateQuery,
134
134
  walkQuery,
135
135
  zonedMoment
136
- } from "./chunk-ZH743WNV.js";
136
+ } from "./chunk-SU4WPBQE.js";
137
137
  import {
138
- CliError,
139
138
  array,
140
139
  boolean,
141
- isCliError,
142
140
  literal,
143
141
  maxLength,
144
142
  minLength,
@@ -150,13 +148,19 @@ import {
150
148
  regex,
151
149
  safeInteger,
152
150
  safeParse,
153
- singleLine,
154
151
  strictObject,
155
152
  string
156
- } from "./chunk-JF7ZEUXU.js";
153
+ } from "./chunk-N67BLTBV.js";
157
154
  import {
158
155
  resolveFrom
159
156
  } from "./chunk-Y5E2WNWB.js";
157
+ import {
158
+ CliError,
159
+ isCliError
160
+ } from "./chunk-S6S3KVJI.js";
161
+ import {
162
+ singleLine
163
+ } from "./chunk-UYV2JGLQ.js";
160
164
  import {
161
165
  SQLiteTable,
162
166
  TableAliasProxyHandler,
@@ -36070,7 +36074,7 @@ var openSqlite = /* @__PURE__ */ __name(async (path, { readOnly = false } = {})
36070
36074
  var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
36071
36075
  quietSqliteWarning();
36072
36076
  const { drizzle } = await import("./node-4SNKUPXT.js");
36073
- const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-O4BAODFR.js");
36077
+ const { cacheOverNodeSqlite, nodeClient } = await import("./node-sqlite-SYZUTVPC.js");
36074
36078
  const client = await nodeClient(path, { readOnly });
36075
36079
  try {
36076
36080
  return { database: cacheOverNodeSqlite(client), orm: drizzle({ client }) };
@@ -36080,7 +36084,7 @@ var openUnderNode = /* @__PURE__ */ __name(async (path, readOnly) => {
36080
36084
  }
36081
36085
  }, "openUnderNode");
36082
36086
  var openUnderBun = /* @__PURE__ */ __name(async (path, readOnly) => {
36083
- const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-NS32GMM4.js");
36087
+ const { bunClient, cacheOverBunSqlite } = await import("./bun-sqlite-HGBEHQI3.js");
36084
36088
  const { drizzle } = await import("./bun-O4WHGL2F.js");
36085
36089
  const client = await bunClient(path, readOnly ? { readonly: true, create: false } : void 0);
36086
36090
  try {
@@ -0,0 +1,23 @@
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-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
8
+ var installerOf = /* @__PURE__ */ __name((scriptPath) => {
9
+ const path = scriptPath.replaceAll("\\", "/");
10
+ if (path.includes("/_npx/"))
11
+ return "npx";
12
+ if (path.includes("/install/global/node_modules/"))
13
+ return "bun";
14
+ if (/\/\.?pnpm\//.test(path))
15
+ return "pnpm";
16
+ if (path.includes("/node_modules/"))
17
+ return "npm";
18
+ return path.includes("/dist/") ? "checkout" : "unknown";
19
+ }, "installerOf");
20
+
21
+ export {
22
+ installerOf
23
+ };
@@ -1,5 +1,22 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CHART_KINDS,
5
+ CHART_SIZE,
6
+ chartAnswer,
7
+ chartPng,
8
+ chartRenderer,
9
+ chatChart,
10
+ keepRefreshedRefs,
11
+ mcpUrlOf,
12
+ refuseWriteBeforeConnecting,
13
+ registerPrompts,
14
+ stdinFieldOf,
15
+ syncsFirst
16
+ } from "./chunk-GNGBG5BT.js";
17
+ import {
18
+ answeredWire
19
+ } from "./chunk-U3ZUT557.js";
3
20
  import {
4
21
  BinaryResource,
5
22
  Picture,
@@ -20,62 +37,45 @@ import {
20
37
  tool,
21
38
  toolKey,
22
39
  toolsFromCommands
23
- } from "./chunk-NNNEVWFF.js";
24
- import {
25
- CHART_KINDS,
26
- CHART_SIZE,
27
- chartAnswer,
28
- chartPng,
29
- chartRenderer,
30
- chatChart,
31
- keepRefreshedRefs,
32
- mcpUrlOf,
33
- refuseWriteBeforeConnecting,
34
- registerPrompts,
35
- stdinFieldOf,
36
- syncsFirst
37
- } from "./chunk-ZFNM3FNI.js";
40
+ } from "./chunk-TMVKZMDO.js";
38
41
  import {
39
42
  agentJson,
40
43
  skillResource
41
- } from "./chunk-VJTGYBJJ.js";
42
- import {
43
- instructions
44
- } from "./chunk-S4GDDO5S.js";
45
- import {
46
- mcpHttpMarker
47
- } from "./chunk-TC7PD3LH.js";
48
- import {
49
- answeredWire
50
- } from "./chunk-U3ZUT557.js";
44
+ } from "./chunk-7PF56S6U.js";
51
45
  import {
52
46
  StdioServerTransport,
53
47
  callerOf,
54
48
  callingAgent,
55
49
  serveStdio
56
- } from "./chunk-MZ6U6HNJ.js";
50
+ } from "./chunk-7KCTPGOF.js";
51
+ import {
52
+ instructions
53
+ } from "./chunk-S4GDDO5S.js";
57
54
  import {
58
55
  McpServer,
59
56
  ResourceTemplate
60
57
  } from "./chunk-5D4AEUVA.js";
58
+ import {
59
+ mcpHttpMarker
60
+ } from "./chunk-LN2S3RA3.js";
61
61
  import {
62
62
  connectedFor,
63
63
  guardFor
64
- } from "./chunk-5NGOP4EZ.js";
64
+ } from "./chunk-5GD2XZ6X.js";
65
65
  import {
66
66
  lackedNeed,
67
67
  wholeList
68
- } from "./chunk-2H5SXK7K.js";
68
+ } from "./chunk-N6JMJN5A.js";
69
69
  import {
70
70
  capability,
71
71
  dateWindow,
72
72
  imageSize,
73
73
  servicesFor,
74
74
  storedDeps
75
- } from "./chunk-M6IDHQ7N.js";
75
+ } from "./chunk-RO44LANT.js";
76
76
  import {
77
77
  findCommand
78
- } from "./chunk-IPTI3Y2E.js";
78
+ } from "./chunk-ZTL7ANSG.js";
79
79
  import {
80
80
  DEFAULT_OUTPUT_BYTES,
81
81
  changesAuthorityAt,
@@ -88,35 +88,34 @@ import {
88
88
  rootOf2 as rootOf,
89
89
  sealed,
90
90
  snakeKeys
91
- } from "./chunk-6CS7ETBK.js";
91
+ } from "./chunk-A2SCXNA7.js";
92
92
  import {
93
93
  readOnlyLockOf
94
- } from "./chunk-WLSF3GCC.js";
94
+ } from "./chunk-Z6U3MEGJ.js";
95
95
  import {
96
96
  withCaller
97
- } from "./chunk-GBZF4IIP.js";
97
+ } from "./chunk-3Y2F65AY.js";
98
98
  import {
99
99
  typedCommand
100
- } from "./chunk-25IDWPEN.js";
100
+ } from "./chunk-5A26IBAR.js";
101
101
  import {
102
102
  isCliFailure
103
- } from "./chunk-Z5424QL6.js";
103
+ } from "./chunk-6GSJLNP4.js";
104
104
  import {
105
105
  levelFor,
106
106
  readKeysForCommand
107
- } from "./chunk-OXUHTKO2.js";
108
- import {
109
- warmEmbedders
110
- } from "./chunk-T3KICUOK.js";
107
+ } from "./chunk-5HPALDUO.js";
111
108
  import {
112
109
  openStore,
113
110
  pdfPreviewLimits
114
- } from "./chunk-GXCNCMUY.js";
111
+ } from "./chunk-IKQ73INC.js";
112
+ import {
113
+ warmEmbedders
114
+ } from "./chunk-AZ7ICKIA.js";
115
115
  import {
116
116
  timezoneOf
117
- } from "./chunk-ZH743WNV.js";
117
+ } from "./chunk-SU4WPBQE.js";
118
118
  import {
119
- CliError,
120
119
  description,
121
120
  integer,
122
121
  maxValue,
@@ -130,9 +129,14 @@ import {
130
129
  pipe,
131
130
  regex,
132
131
  strictObject,
133
- string,
132
+ string
133
+ } from "./chunk-N67BLTBV.js";
134
+ import {
135
+ CliError
136
+ } from "./chunk-S6S3KVJI.js";
137
+ import {
134
138
  visibleControls
135
- } from "./chunk-JF7ZEUXU.js";
139
+ } from "./chunk-UYV2JGLQ.js";
136
140
  import {
137
141
  __name
138
142
  } from "./chunk-ZVVMGPBJ.js";
@@ -748,7 +752,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
748
752
  }, "serveOverStdio");
749
753
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
750
754
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
751
- const { serveOverHttp } = await import("./serve-WAOSED3I.js");
755
+ const { serveOverHttp } = await import("./serve-KGHEDUHB.js");
752
756
  const appName = messenger.app.command;
753
757
  const appEnvPrefix = messenger.app.envPrefix;
754
758
  const listening = await serveOverHttp(build, {
@@ -4,10 +4,10 @@ import {
4
4
  MAX_SECRET_INPUT,
5
5
  bufferedInput,
6
6
  inputPolicy
7
- } from "./chunk-KYLS5QGC.js";
7
+ } from "./chunk-7JMBEPW2.js";
8
8
  import {
9
9
  CliError
10
- } from "./chunk-JF7ZEUXU.js";
10
+ } from "./chunk-S6S3KVJI.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-JF7ZEUXU.js";
5
+ } from "./chunk-S6S3KVJI.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
@@ -3,18 +3,20 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  envName,
5
5
  readOnlyLockOf
6
- } from "./chunk-WLSF3GCC.js";
6
+ } from "./chunk-Z6U3MEGJ.js";
7
7
  import {
8
8
  CAPABILITY_STATEMENTS,
9
9
  storeCapable
10
- } from "./chunk-QI7BZS2G.js";
10
+ } from "./chunk-62GOOZO3.js";
11
11
  import {
12
- CliError,
13
12
  catchCrashes
14
- } from "./chunk-JF7ZEUXU.js";
13
+ } from "./chunk-N67BLTBV.js";
15
14
  import {
16
15
  importFrom
17
16
  } from "./chunk-Y5E2WNWB.js";
17
+ import {
18
+ CliError
19
+ } from "./chunk-S6S3KVJI.js";
18
20
  import {
19
21
  __name
20
22
  } from "./chunk-ZVVMGPBJ.js";
@@ -188,8 +190,8 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
188
190
  if (command.optsWithGlobals().dryRun === true)
189
191
  return;
190
192
  const [{ setupAtStart }, { commandPathOf }] = await Promise.all([
191
- import("./first-run-OCVEJH63.js"),
192
- import("./command-contract-O4FDXM4U.js")
193
+ import("./first-run-J5FG773Q.js"),
194
+ import("./command-contract-CQFJXWX6.js")
193
195
  ]);
194
196
  await setupAtStart({
195
197
  command: entry.app.command,
@@ -204,7 +206,7 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
204
206
  ask: /* @__PURE__ */ __name(async (question, command) => {
205
207
  if (headless(command) || io.stdin.isTTY !== true)
206
208
  return false;
207
- const { readSecret } = await import("./prompt-IUD7HCDC.js");
209
+ const { readSecret } = await import("./prompt-CYBKP7S5.js");
208
210
  const answer = await readSecret(`${question} [y/N] `, {
209
211
  input: io.stdin,
210
212
  output: io.stderr,