@wirecat/drive-cli 0.61.0 → 0.63.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 (152) hide show
  1. package/dist/bin/drive.js +2 -2
  2. package/dist/browse.d.ts +20 -0
  3. package/dist/browse.d.ts.map +1 -0
  4. package/dist/browse.js +146 -0
  5. package/dist/browse.js.map +1 -0
  6. package/dist/bundle/{all-profiles-H4L3Z5UM.js → all-profiles-GZJS3UKC.js} +13 -14
  7. package/dist/bundle/{anthropic-PPGFISVP.js → anthropic-RGV3WXX5.js} +9 -9
  8. package/dist/bundle/{app-server-YXVK2FUZ.js → app-server-AA2PJ7PV.js} +57 -55
  9. package/dist/bundle/{bun-DKZAL6ML.js → bun-OXZYIA3R.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-MTZY36QK.js → bun-sqlite-D45NSDM3.js} +8 -8
  11. package/dist/bundle/{chunk-KV4267S4.js → chunk-27YUUGXQ.js} +1 -1
  12. package/dist/bundle/{chunk-6IBM4Z3V.js → chunk-2HF2MRXI.js} +1 -1
  13. package/dist/bundle/{chunk-HGOYQUT7.js → chunk-2NIC72HH.js} +4 -2
  14. package/dist/bundle/{chunk-XZBR2O63.js → chunk-2TDUGC5D.js} +1501 -781
  15. package/dist/bundle/{chunk-DEPMQHXQ.js → chunk-2TFXK3R4.js} +4 -4
  16. package/dist/bundle/{chunk-JVBLXSAA.js → chunk-33MGFUED.js} +652 -249
  17. package/dist/bundle/{chunk-S4YK6TTG.js → chunk-3BZRKLJ6.js} +13 -13
  18. package/dist/bundle/{chunk-6SUGANRJ.js → chunk-3HK5WMI5.js} +6 -6
  19. package/dist/bundle/{chunk-YWIU4HOT.js → chunk-3QINVLZI.js} +1 -1
  20. package/dist/bundle/{chunk-XYCCGGKN.js → chunk-44SBK6KB.js} +1207 -643
  21. package/dist/bundle/{chunk-LARQTWIL.js → chunk-4CIZWCXV.js} +1 -1
  22. package/dist/bundle/{chunk-WZ5XK74U.js → chunk-4OSSOWDM.js} +1 -1
  23. package/dist/bundle/{chunk-XGNC5OJG.js → chunk-4S4JMW6I.js} +1 -1
  24. package/dist/bundle/{chunk-WIU733D2.js → chunk-534OBX5Y.js} +1 -1
  25. package/dist/bundle/{chunk-UO2IUDVK.js → chunk-5PPL7JDM.js} +2 -2
  26. package/dist/bundle/{chunk-OFFA54TW.js → chunk-6EY46GAN.js} +2 -2
  27. package/dist/bundle/{chunk-RFRCOAWS.js → chunk-6KQJSFYF.js} +22 -22
  28. package/dist/bundle/{chunk-6DN4VPA7.js → chunk-6MQSQ4LX.js} +33 -31
  29. package/dist/bundle/{chunk-NIX2MWHZ.js → chunk-7EMQ26BA.js} +39 -25
  30. package/dist/bundle/{chunk-X2CXW4HM.js → chunk-ABYGSJZ4.js} +7 -7
  31. package/dist/bundle/{chunk-I26VL4W7.js → chunk-AEX37ETW.js} +2 -2
  32. package/dist/bundle/{chunk-36CWGEVX.js → chunk-BKYMKVHT.js} +2 -2
  33. package/dist/bundle/{chunk-3WZH3WV3.js → chunk-CE2TJBLP.js} +3 -3
  34. package/dist/bundle/{chunk-YMBFZA3H.js → chunk-DJ3SDJZY.js} +8 -8
  35. package/dist/bundle/{chunk-DXPOVLQC.js → chunk-DJHLVUL6.js} +227 -90
  36. package/dist/bundle/{chunk-VPDAH7PJ.js → chunk-E4SDKMBJ.js} +59 -1
  37. package/dist/bundle/{chunk-NZ2EIZLX.js → chunk-EOOGWUTP.js} +10 -10
  38. package/dist/bundle/{chunk-VYXVPYA3.js → chunk-FEZF3TII.js} +6 -6
  39. package/dist/bundle/{chunk-Q4XVBKX4.js → chunk-FRIJUILO.js} +3 -3
  40. package/dist/bundle/{chunk-OLPJRD4S.js → chunk-FUITWY7O.js} +1 -1
  41. package/dist/bundle/{chunk-AM4RIWOZ.js → chunk-HZZCEQTH.js} +18 -4
  42. package/dist/bundle/{chunk-2RJA4BQB.js → chunk-J24ZFCWM.js} +39 -26
  43. package/dist/bundle/{chunk-QSGT4ZH4.js → chunk-J4DIHPZ6.js} +1 -1
  44. package/dist/bundle/{chunk-ZHYRHERD.js → chunk-L37LMMRJ.js} +2 -2
  45. package/dist/bundle/{chunk-XLFJLZJL.js → chunk-LMAVCYLQ.js} +22 -14
  46. package/dist/bundle/{chunk-E6J5YH2N.js → chunk-LZEOQW7S.js} +36 -36
  47. package/dist/bundle/{chunk-FE5JJXKA.js → chunk-MOTRI3SY.js} +2 -2
  48. package/dist/bundle/{chunk-PJTX2MOI.js → chunk-ND6LLYGF.js} +98 -81
  49. package/dist/bundle/{chunk-3I2D5TK2.js → chunk-NEFSGCVA.js} +10 -10
  50. package/dist/bundle/{chunk-OGNOQDWB.js → chunk-O2XOX4HB.js} +34 -10
  51. package/dist/bundle/{chunk-DCBFNBEB.js → chunk-OD4U7GUY.js} +20 -20
  52. package/dist/bundle/{chunk-BXR7BKM3.js → chunk-OTROVC4E.js} +1 -1
  53. package/dist/bundle/{chunk-UKOYQC5O.js → chunk-OXY6SSZG.js} +184 -29
  54. package/dist/bundle/{chunk-ZMNYK3FC.js → chunk-PDCCYHCH.js} +5 -5
  55. package/dist/bundle/{chunk-J5UDQD5S.js → chunk-PO5RQQIG.js} +5 -5
  56. package/dist/bundle/{chunk-PY7LKNOS.js → chunk-Q5DJTRKV.js} +2 -2
  57. package/dist/bundle/{chunk-E5EXJ2XS.js → chunk-QCKZ3GAA.js} +4 -4
  58. package/dist/bundle/{chunk-3SJQNS72.js → chunk-RKELRWH7.js} +5 -5
  59. package/dist/bundle/{chunk-6Y2FWJZ4.js → chunk-S4RXABDR.js} +3 -3
  60. package/dist/bundle/{chunk-BQMIDYBA.js → chunk-SXM6MHRR.js} +12 -12
  61. package/dist/bundle/chunk-TF23BZW5.js +64 -0
  62. package/dist/bundle/{chunk-N2RLJTIW.js → chunk-TWUH22Z5.js} +4 -4
  63. package/dist/bundle/chunk-UPOSDTPT.js +87 -0
  64. package/dist/bundle/{chunk-J4HQVHMN.js → chunk-UQLWMGSD.js} +5 -5
  65. package/dist/bundle/{chunk-K7LS3NGM.js → chunk-V3NVXIQR.js} +736 -230
  66. package/dist/bundle/{chunk-TKGAYKXW.js → chunk-VAUMOZU5.js} +228 -66
  67. package/dist/bundle/{chunk-BF6TQMNB.js → chunk-VJEOGKAN.js} +8 -10
  68. package/dist/bundle/{chunk-XGMDWIUP.js → chunk-VKPCONDQ.js} +4 -4
  69. package/dist/bundle/{chunk-73WSULMI.js → chunk-WYGWWHZP.js} +2 -2
  70. package/dist/bundle/{chunk-5W56YMQS.js → chunk-XDC3TWTL.js} +60 -51
  71. package/dist/bundle/{chunk-5W7D5H2R.js → chunk-XIUDS3OK.js} +1 -1
  72. package/dist/bundle/{chunk-3UPIJ7DW.js → chunk-XNVFKMVR.js} +21868 -4533
  73. package/dist/bundle/{chunk-O5CUFS7T.js → chunk-XR6ESRU6.js} +2 -2
  74. package/dist/bundle/{chunk-EPCJUL6M.js → chunk-Y6GNA7HE.js} +3 -3
  75. package/dist/bundle/{chunk-67HS46KM.js → chunk-YGU6ULU5.js} +12 -12
  76. package/dist/bundle/{chunk-HFM653T3.js → chunk-YIP7ELON.js} +768 -131
  77. package/dist/bundle/{chunk-3252WXOL.js → chunk-YUWPNG7B.js} +1 -1
  78. package/dist/bundle/{chunk-QR5VQXQ5.js → chunk-Z42YYLTS.js} +59 -37
  79. package/dist/bundle/{chunk-AWN22PJK.js → chunk-Z5KC7XBR.js} +3 -3
  80. package/dist/bundle/{chunk-ECEYAQGN.js → chunk-ZM5J6ZMB.js} +4 -2
  81. package/dist/bundle/{chunk-YPF6OS37.js → chunk-ZMOUUOT2.js} +1 -1
  82. package/dist/bundle/{chunk-CACYL36O.js → chunk-ZOJU7ZFI.js} +8 -8
  83. package/dist/bundle/command-contract-BRW3AP44.js +38 -0
  84. package/dist/bundle/{decode-62A3HGPW.js → decode-G5YEIPNC.js} +8 -8
  85. package/dist/bundle/{dispatch-IE7PBEQC.js → dispatch-GEFIXA6X.js} +9 -9
  86. package/dist/bundle/drive.js +11 -11
  87. package/dist/bundle/{echarts-BGBPRGR5.js → echarts-W2CWHNXR.js} +2 -2
  88. package/dist/bundle/{embed-J3IBVV2V.js → embed-OBFFPVF4.js} +9 -9
  89. package/dist/bundle/{embedder-QFPMDRT2.js → embedder-NGCBQHIG.js} +12 -12
  90. package/dist/bundle/entry-ET6HGM7A.js +22 -0
  91. package/dist/bundle/{failure-BKOGBMIC.js → failure-GV77W3CD.js} +4 -4
  92. package/dist/bundle/first-run-JG52UZVO.js +30 -0
  93. package/dist/bundle/first-screen-CIL3GFAA.js +36 -0
  94. package/dist/bundle/{google-RXM2XEPD.js → google-CIWUVJ5C.js} +13 -13
  95. package/dist/bundle/{google-api-NC65BZO4.js → google-api-Z3NSTBBR.js} +56 -57
  96. package/dist/bundle/grants-3S4RL3WB.js +104 -0
  97. package/dist/bundle/{identity-PI6F2GWA.js → identity-OM6GFZ7T.js} +6 -6
  98. package/dist/bundle/{instructions-6LPDSKAD.js → instructions-YQBQSYSS.js} +1 -1
  99. package/dist/bundle/{login-HTY7GT2S.js → login-7RYSDVN3.js} +62 -63
  100. package/dist/bundle/{mcp-PPVOM4SE.js → mcp-GWDA3HOA.js} +2 -2
  101. package/dist/bundle/{node-IB246NCQ.js → node-IVU33RL7.js} +2 -2
  102. package/dist/bundle/{node-sqlite-G2Y5SFJM.js → node-sqlite-SIH5BEW2.js} +9 -9
  103. package/dist/bundle/oauth-PT4JEHLL.js +22 -0
  104. package/dist/bundle/{open-WD4GFSJD.js → open-IAO2SNII.js} +8 -8
  105. package/dist/bundle/{openai-QVM4PMY7.js → openai-SGOUBHXP.js} +17 -17
  106. package/dist/bundle/{process-SWPJGPQC.js → process-BPBMV3AT.js} +1 -1
  107. package/dist/bundle/{program-WHYFAMXR.js → program-MYKKJ4F6.js} +231 -87
  108. package/dist/bundle/prompt-3ZM64DCB.js +17 -0
  109. package/dist/bundle/{reasons-Q34DQWB6.js → reasons-57J2D77K.js} +5 -5
  110. package/dist/bundle/{recognize-DM3YWHSE.js → recognize-A5C5RPB3.js} +7 -7
  111. package/dist/bundle/{remote-KXVWRK7J.js → remote-VWYFLRGO.js} +10 -10
  112. package/dist/bundle/{rerank-TINXM3MY.js → rerank-4NGQWREA.js} +10 -10
  113. package/dist/bundle/{serve-IY2WL656.js → serve-Y6LQTFH5.js} +12 -12
  114. package/dist/bundle/{server-VPY3OWPC.js → server-6AUHIIUA.js} +43 -44
  115. package/dist/bundle/server-PFHI35HA.js +69 -0
  116. package/dist/bundle/{services-PXNBOCOC.js → services-2W4J7EMW.js} +47 -32
  117. package/dist/bundle/{sqlite-runtime-5ZK2CV7Y.js → sqlite-runtime-P6BBDX2H.js} +9 -9
  118. package/dist/bundle/{start-LDVCN3DK.js → start-AFFA3LKM.js} +9 -7
  119. package/dist/bundle/{state-3MKTT3VS.js → state-PXKKXR3R.js} +9 -9
  120. package/dist/bundle/{store-4VQOT5IJ.js → store-CN6JEUC4.js} +28 -18
  121. package/dist/bundle/{store-7M4MSUJV.js → store-IVV2BAGZ.js} +78 -28
  122. package/dist/bundle/store-maintenance-command-MSY2QNEH.js +59 -0
  123. package/dist/bundle/tokens-P4LPNUFW.js +102 -0
  124. package/dist/commands/config.d.ts.map +1 -1
  125. package/dist/commands/config.js +5 -1
  126. package/dist/commands/config.js.map +1 -1
  127. package/dist/commands/folders.d.ts +2 -1
  128. package/dist/commands/folders.d.ts.map +1 -1
  129. package/dist/commands/folders.js +16 -3
  130. package/dist/commands/folders.js.map +1 -1
  131. package/dist/program.js +1 -1
  132. package/dist/program.js.map +1 -1
  133. package/dist/tokens.d.ts.map +1 -1
  134. package/dist/tokens.js +15 -6
  135. package/dist/tokens.js.map +1 -1
  136. package/dist/version.d.ts +1 -1
  137. package/dist/version.js +1 -1
  138. package/package.json +3 -3
  139. package/dist/bundle/chunk-BCWUDTYQ.js +0 -22
  140. package/dist/bundle/chunk-W767AUNR.js +0 -132
  141. package/dist/bundle/chunk-WUP2MJDN.js +0 -42
  142. package/dist/bundle/command-contract-T3EO5AYD.js +0 -39
  143. package/dist/bundle/entry-YQSYER66.js +0 -22
  144. package/dist/bundle/first-run-ZIFPVZAI.js +0 -30
  145. package/dist/bundle/first-screen-L5U26EY7.js +0 -37
  146. package/dist/bundle/grants-SEWUYYH3.js +0 -105
  147. package/dist/bundle/oauth-MWBKBI4T.js +0 -22
  148. package/dist/bundle/prompt-OVYCGZB7.js +0 -17
  149. package/dist/bundle/server-EMWVVT2C.js +0 -70
  150. package/dist/bundle/store-maintenance-command-NRATYBWD.js +0 -60
  151. package/dist/bundle/tokens-XUKLM3SL.js +0 -103
  152. /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-ZQ3GWKDQ.js} +0 -0
@@ -3,11 +3,11 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  operations,
5
5
  privateFiles
6
- } from "./chunk-XZBR2O63.js";
6
+ } from "./chunk-2TDUGC5D.js";
7
7
  import {
8
8
  commandPathKey,
9
9
  commandPermissions
10
- } from "./chunk-5W56YMQS.js";
10
+ } from "./chunk-XDC3TWTL.js";
11
11
  import {
12
12
  AI_ENTRIES,
13
13
  checkConfigText,
@@ -15,23 +15,23 @@ import {
15
15
  settingsFor,
16
16
  usableProfileName,
17
17
  withSettingDefaults
18
- } from "./chunk-JVBLXSAA.js";
18
+ } from "./chunk-33MGFUED.js";
19
19
  import {
20
20
  LEVELS
21
- } from "./chunk-6DN4VPA7.js";
21
+ } from "./chunk-6MQSQ4LX.js";
22
22
  import {
23
23
  MAX_TEXT_CHARS
24
- } from "./chunk-WUP2MJDN.js";
24
+ } from "./chunk-UPOSDTPT.js";
25
25
  import {
26
26
  DRIVE_APP
27
- } from "./chunk-UO2IUDVK.js";
27
+ } from "./chunk-5PPL7JDM.js";
28
28
  import {
29
29
  BASE_CONSTANTS,
30
30
  baseConstantsSchema,
31
31
  loadConstants,
32
32
  resolvePaths,
33
33
  saveConfigFile
34
- } from "./chunk-DCBFNBEB.js";
34
+ } from "./chunk-OD4U7GUY.js";
35
35
  import {
36
36
  array,
37
37
  boolean,
@@ -54,15 +54,15 @@ import {
54
54
  transform,
55
55
  trim,
56
56
  union
57
- } from "./chunk-VYXVPYA3.js";
57
+ } from "./chunk-FEZF3TII.js";
58
58
  import {
59
59
  CliError
60
- } from "./chunk-WZ5XK74U.js";
60
+ } from "./chunk-4OSSOWDM.js";
61
61
  import {
62
62
  __name
63
63
  } from "./chunk-ZVVMGPBJ.js";
64
64
 
65
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/oauth/client-file.js
65
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/oauth/client-file.js
66
66
  import { readFileSync } from "node:fs";
67
67
  var readClientFile = /* @__PURE__ */ __name((location, options = {}) => {
68
68
  if (!options.shipped && typeof location === "string") {
@@ -83,7 +83,7 @@ var readClientFile = /* @__PURE__ */ __name((location, options = {}) => {
83
83
  }
84
84
  }, "readClientFile");
85
85
 
86
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/constants/obscure.js
86
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/constants/obscure.js
87
87
  import { createDecipheriv } from "node:crypto";
88
88
  var KEY = Buffer.from("d43012779aa2dded3e98092a3dbcf5d8980c564172f5ce0a5fd0574e5f740339", "hex");
89
89
  var reveal = /* @__PURE__ */ __name((obscured) => {
@@ -92,7 +92,7 @@ var reveal = /* @__PURE__ */ __name((obscured) => {
92
92
  return Buffer.concat([decipher.update(bytes.subarray(16)), decipher.final()]).toString("utf8");
93
93
  }, "reveal");
94
94
 
95
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/constants/index.js
95
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/constants/index.js
96
96
  var CORE_CONSTANTS = new URL("../../constants.json", new URL("constants/index.js", import.meta.resolve("@wirecat/cli-core")).href);
97
97
  var constantsSchema = object({
98
98
  ...baseConstantsSchema.entries,
@@ -0,0 +1,64 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ count,
5
+ id,
6
+ text,
7
+ time
8
+ } from "./chunk-V3NVXIQR.js";
9
+ import {
10
+ array,
11
+ nullable,
12
+ optional,
13
+ picklist,
14
+ record,
15
+ reference,
16
+ strictObject,
17
+ string,
18
+ unknown
19
+ } from "./chunk-FEZF3TII.js";
20
+
21
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/entities/note.js
22
+ var link = {
23
+ target_text: nullable(text),
24
+ kind: text,
25
+ anchor: nullable(text)
26
+ };
27
+ var note = strictObject({
28
+ ref: reference,
29
+ kind: optional(picklist(["note", "document"])),
30
+ provider: optional(text),
31
+ account: optional(text),
32
+ url: optional(text),
33
+ id,
34
+ source: picklist(["file", "internal"]),
35
+ folder_id: nullable(id),
36
+ path: nullable(text),
37
+ title: nullable(text),
38
+ text,
39
+ /** Raises on every edit; `notes edit --revision` takes it, so an edit made meanwhile is refused, not lost. */
40
+ revision: count,
41
+ /** A file's front matter as parsed, keys as the file writes them; null for a note without it. */
42
+ front_matter: nullable(record(string(), unknown())),
43
+ /** The hash of a file's bytes when last imported; null for a note written here. */
44
+ content_hash: nullable(text),
45
+ /** The file the note was exported to, where that is known; null otherwise. */
46
+ export_path: nullable(text),
47
+ created_at: time,
48
+ /** When the store's copy last changed. */
49
+ updated_at: time,
50
+ deleted_at: optional(nullable(time)),
51
+ tags: optional(array(text)),
52
+ /** The first line holding a word of a search. */
53
+ excerpt: optional(text),
54
+ /** Which halves of a search found it. */
55
+ found_by: optional(array(picklist(["title", "words", "meaning"]))),
56
+ /** What the note links to; `to` is null while the name written matches nothing stored. */
57
+ links: optional(array(strictObject({ to: nullable(reference), ...link }))),
58
+ /** The notes and messages that link to it. */
59
+ backlinks: optional(array(strictObject({ from: reference, ...link })))
60
+ });
61
+
62
+ export {
63
+ note
64
+ };
@@ -11,7 +11,7 @@ import {
11
11
  checkApiParameter,
12
12
  operations,
13
13
  parseApiJson
14
- } from "./chunk-XZBR2O63.js";
14
+ } from "./chunk-2TDUGC5D.js";
15
15
  import {
16
16
  array,
17
17
  boolean,
@@ -27,15 +27,15 @@ import {
27
27
  string,
28
28
  transform,
29
29
  unknown
30
- } from "./chunk-VYXVPYA3.js";
30
+ } from "./chunk-FEZF3TII.js";
31
31
  import {
32
32
  CliError
33
- } from "./chunk-WZ5XK74U.js";
33
+ } from "./chunk-4OSSOWDM.js";
34
34
  import {
35
35
  __name
36
36
  } from "./chunk-ZVVMGPBJ.js";
37
37
 
38
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/codegen/runtime.js
38
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/codegen/runtime.js
39
39
  var isLossless = /* @__PURE__ */ __name((input) => typeof input === "object" && input !== null && input.isLosslessNumber === true && typeof input.value === "string", "isLossless");
40
40
  var INTEGER = /^-?\d+$/;
41
41
  var INT64_MIN = -(2n ** 63n);
@@ -0,0 +1,87 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CliError
5
+ } from "./chunk-4OSSOWDM.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/attachments/limits.js
11
+ var MAX_FILE_BYTES = 50 * 1024 * 1024;
12
+ var MAX_TEXT_CHARS = 2e6;
13
+ var ATTACHMENT_LIMIT_ENV = [
14
+ "MESSAGING_BATCH_MAX_ERROR_PERCENT",
15
+ "MESSAGING_ATTACHMENT_MAX_MIB",
16
+ "MESSAGING_PDF_PREVIEW_MAX_PIXELS",
17
+ "MESSAGING_PDF_PREVIEW_MAX_MIB"
18
+ ];
19
+ var positive = /* @__PURE__ */ __name((env, name, fallback, factor = 1) => {
20
+ const raw = env[name];
21
+ if (raw === void 0)
22
+ return fallback;
23
+ const value = Number(raw);
24
+ if (!/^[0-9]+$/.test(raw) || value < 1 || !Number.isSafeInteger(value * factor))
25
+ throw new CliError("validation_error", `${name} must be a positive whole number within the safe numeric range`);
26
+ return value * factor;
27
+ }, "positive");
28
+ var attachmentMaxBytes = /* @__PURE__ */ __name((env = process.env) => positive(env, "MESSAGING_ATTACHMENT_MAX_MIB", MAX_FILE_BYTES, 1024 * 1024), "attachmentMaxBytes");
29
+ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
30
+ const pixels = positive(env, "MESSAGING_PDF_PREVIEW_MAX_PIXELS", 4e3);
31
+ if (!Number.isSafeInteger(pixels * pixels))
32
+ throw new CliError("validation_error", "MESSAGING_PDF_PREVIEW_MAX_PIXELS squared must fit the safe numeric range");
33
+ return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
34
+ }, "pdfPreviewLimits");
35
+
36
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_835308f42ae01aacd71fad942c0d0dc0/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
37
+ var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
38
+ var ID = /^[\w-]{10,}$/;
39
+ var trimUrl = /* @__PURE__ */ __name((url) => {
40
+ let end = url.length;
41
+ for (; ; ) {
42
+ const last = url[end - 1];
43
+ if (last === void 0)
44
+ break;
45
+ if (".,;:!?".includes(last))
46
+ end -= 1;
47
+ else if (last === ")" || last === "]") {
48
+ const open = last === ")" ? "(" : "[";
49
+ const head = url.slice(0, end);
50
+ if (head.split(open).length >= head.split(last).length)
51
+ break;
52
+ end -= 1;
53
+ } else
54
+ break;
55
+ }
56
+ return url.slice(0, end);
57
+ }, "trimUrl");
58
+ var isGoogleDocumentHost = /* @__PURE__ */ __name((hostname) => /^(?:docs|drive|sheets|slides)\.google\.com$/.test(hostname.toLowerCase()), "isGoogleDocumentHost");
59
+ var googleDocumentId = /* @__PURE__ */ __name((url) => {
60
+ let parsed;
61
+ try {
62
+ parsed = new URL(url);
63
+ } catch {
64
+ return null;
65
+ }
66
+ if (!isGoogleDocumentHost(parsed.hostname))
67
+ return null;
68
+ const segments = parsed.pathname.split("/");
69
+ const at = segments.indexOf("d");
70
+ const candidate = at < 0 ? parsed.searchParams.get("id") : segments[segments[at + 1] === "e" ? at + 2 : at + 1];
71
+ return candidate && ID.test(candidate) ? candidate : null;
72
+ }, "googleDocumentId");
73
+ var googleDocumentLinks = /* @__PURE__ */ __name((text) => [...text.matchAll(LINK)].map(([match]) => {
74
+ const url = trimUrl(match);
75
+ return { url, documentId: googleDocumentId(url) };
76
+ }), "googleDocumentLinks");
77
+
78
+ export {
79
+ trimUrl,
80
+ googleDocumentId,
81
+ googleDocumentLinks,
82
+ MAX_FILE_BYTES,
83
+ MAX_TEXT_CHARS,
84
+ ATTACHMENT_LIMIT_ENV,
85
+ attachmentMaxBytes,
86
+ pdfPreviewLimits
87
+ };
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  visibleControls
5
- } from "./chunk-6IBM4Z3V.js";
5
+ } from "./chunk-2HF2MRXI.js";
6
6
  import {
7
7
  BASE_REASONS,
8
8
  COMMON_DETAILS,
@@ -10,16 +10,16 @@ import {
10
10
  CRASH_REASON,
11
11
  stepOf,
12
12
  writes
13
- } from "./chunk-VYXVPYA3.js";
13
+ } from "./chunk-FEZF3TII.js";
14
14
  import {
15
15
  errorCodes,
16
16
  isCliError
17
- } from "./chunk-WZ5XK74U.js";
17
+ } from "./chunk-4OSSOWDM.js";
18
18
  import {
19
19
  __name
20
20
  } from "./chunk-ZVVMGPBJ.js";
21
21
 
22
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_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
22
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_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
23
23
  var EXIT_CODES = {
24
24
  validation_error: 2,
25
25
  configuration_error: 3,
@@ -40,7 +40,7 @@ var EXIT_CODES = {
40
40
  var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
41
41
  var GENERIC_FAILURE = 1;
42
42
 
43
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
43
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
44
44
  var recognise = /* @__PURE__ */ __name((failure) => {
45
45
  if (isCliError(failure))
46
46
  return failure;