@wirecat/drive-cli 0.61.0 → 0.62.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 (148) 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-CKD2DWUK.js} +14 -14
  7. package/dist/bundle/{anthropic-PPGFISVP.js → anthropic-E3T4USLA.js} +9 -9
  8. package/dist/bundle/{app-server-YXVK2FUZ.js → app-server-JB2AEWWL.js} +58 -55
  9. package/dist/bundle/{bun-DKZAL6ML.js → bun-CC44AAND.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-MTZY36QK.js → bun-sqlite-AUMFKYVR.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-3I2D5TK2.js → chunk-2KN35F32.js} +10 -10
  14. package/dist/bundle/{chunk-WZ5XK74U.js → chunk-4OSSOWDM.js} +1 -1
  15. package/dist/bundle/{chunk-UO2IUDVK.js → chunk-4SIZEJ3M.js} +2 -2
  16. package/dist/bundle/{chunk-6Y2FWJZ4.js → chunk-67ZQCWBV.js} +3 -3
  17. package/dist/bundle/{chunk-OFFA54TW.js → chunk-6EY46GAN.js} +2 -2
  18. package/dist/bundle/{chunk-ECEYAQGN.js → chunk-7W5HYGVW.js} +4 -2
  19. package/dist/bundle/{chunk-67HS46KM.js → chunk-7ZXIWZQ6.js} +12 -12
  20. package/dist/bundle/{chunk-J5UDQD5S.js → chunk-AH5C3D3D.js} +5 -5
  21. package/dist/bundle/{chunk-BCWUDTYQ.js → chunk-AQVUEZEP.js} +2 -2
  22. package/dist/bundle/{chunk-K7LS3NGM.js → chunk-CJHY5YIF.js} +494 -227
  23. package/dist/bundle/{chunk-PY7LKNOS.js → chunk-CZ2GJHLL.js} +2 -2
  24. package/dist/bundle/{chunk-NIX2MWHZ.js → chunk-DJOAMGF4.js} +39 -25
  25. package/dist/bundle/{chunk-AWN22PJK.js → chunk-DRZZBN3V.js} +3 -3
  26. package/dist/bundle/{chunk-DEPMQHXQ.js → chunk-DWJHL6DV.js} +4 -4
  27. package/dist/bundle/{chunk-QSGT4ZH4.js → chunk-E43ENLJJ.js} +1 -1
  28. package/dist/bundle/{chunk-NZ2EIZLX.js → chunk-EOOGWUTP.js} +10 -10
  29. package/dist/bundle/{chunk-5W56YMQS.js → chunk-EW7PKB4M.js} +58 -49
  30. package/dist/bundle/{chunk-VYXVPYA3.js → chunk-FEZF3TII.js} +6 -6
  31. package/dist/bundle/{chunk-I26VL4W7.js → chunk-FNWIJ6EJ.js} +2 -2
  32. package/dist/bundle/{chunk-OLPJRD4S.js → chunk-FUITWY7O.js} +1 -1
  33. package/dist/bundle/{chunk-XZBR2O63.js → chunk-HCNQT3QE.js} +1439 -770
  34. package/dist/bundle/{chunk-Q4XVBKX4.js → chunk-HG6CAYJH.js} +3 -3
  35. package/dist/bundle/{chunk-O5CUFS7T.js → chunk-IR4SQLBR.js} +2 -2
  36. package/dist/bundle/{chunk-VPDAH7PJ.js → chunk-JK3U25QZ.js} +1 -1
  37. package/dist/bundle/{chunk-UKOYQC5O.js → chunk-JN5TVEEL.js} +94 -26
  38. package/dist/bundle/{chunk-5W7D5H2R.js → chunk-KLFSRKHB.js} +1 -1
  39. package/dist/bundle/{chunk-RFRCOAWS.js → chunk-L7K2MOIC.js} +22 -22
  40. package/dist/bundle/{chunk-XYCCGGKN.js → chunk-LQKD257P.js} +582 -424
  41. package/dist/bundle/{chunk-73WSULMI.js → chunk-LWE4JGRN.js} +2 -2
  42. package/dist/bundle/{chunk-XGMDWIUP.js → chunk-MN4VXU3M.js} +4 -4
  43. package/dist/bundle/{chunk-N2RLJTIW.js → chunk-N7OZPKU7.js} +4 -4
  44. package/dist/bundle/{chunk-OGNOQDWB.js → chunk-O2XOX4HB.js} +34 -10
  45. package/dist/bundle/{chunk-3SJQNS72.js → chunk-O7ALBI2I.js} +5 -5
  46. package/dist/bundle/{chunk-3WZH3WV3.js → chunk-OBH5BA62.js} +3 -3
  47. package/dist/bundle/{chunk-DCBFNBEB.js → chunk-OD4U7GUY.js} +20 -20
  48. package/dist/bundle/{chunk-PJTX2MOI.js → chunk-ONP2IBHY.js} +26 -26
  49. package/dist/bundle/{chunk-BXR7BKM3.js → chunk-OTROVC4E.js} +1 -1
  50. package/dist/bundle/{chunk-JVBLXSAA.js → chunk-PEQA6LA5.js} +617 -243
  51. package/dist/bundle/{chunk-XLFJLZJL.js → chunk-Q2LRPOKL.js} +22 -14
  52. package/dist/bundle/{chunk-E5EXJ2XS.js → chunk-QCKZ3GAA.js} +4 -4
  53. package/dist/bundle/{chunk-BQMIDYBA.js → chunk-QCX6XZLA.js} +12 -12
  54. package/dist/bundle/{chunk-TKGAYKXW.js → chunk-QH7DOVO3.js} +204 -58
  55. package/dist/bundle/{chunk-YMBFZA3H.js → chunk-QTI6IVHZ.js} +8 -8
  56. package/dist/bundle/{chunk-YWIU4HOT.js → chunk-R347FPYU.js} +1 -1
  57. package/dist/bundle/chunk-RIDQNVZM.js +64 -0
  58. package/dist/bundle/{chunk-AM4RIWOZ.js → chunk-RPMKG63Z.js} +18 -4
  59. package/dist/bundle/{chunk-EPCJUL6M.js → chunk-RWSXVCSG.js} +3 -3
  60. package/dist/bundle/{chunk-36CWGEVX.js → chunk-SVPCHFKI.js} +2 -2
  61. package/dist/bundle/{chunk-ZHYRHERD.js → chunk-SW4I5BR7.js} +2 -2
  62. package/dist/bundle/{chunk-FE5JJXKA.js → chunk-T5NWWXS2.js} +2 -2
  63. package/dist/bundle/{chunk-E6J5YH2N.js → chunk-T7X53FCJ.js} +34 -34
  64. package/dist/bundle/{chunk-X2CXW4HM.js → chunk-TDX4GZFO.js} +7 -7
  65. package/dist/bundle/{chunk-3UPIJ7DW.js → chunk-U2BFYSQV.js} +14158 -2039
  66. package/dist/bundle/{chunk-HFM653T3.js → chunk-UGXN5D7U.js} +719 -128
  67. package/dist/bundle/{chunk-WUP2MJDN.js → chunk-UOXOLGNG.js} +2 -2
  68. package/dist/bundle/{chunk-J4HQVHMN.js → chunk-UQLWMGSD.js} +5 -5
  69. package/dist/bundle/{chunk-6DN4VPA7.js → chunk-VAYB52HF.js} +33 -31
  70. package/dist/bundle/{chunk-BF6TQMNB.js → chunk-VQDD64A4.js} +8 -8
  71. package/dist/bundle/{chunk-ZMNYK3FC.js → chunk-W4RTIL7S.js} +5 -5
  72. package/dist/bundle/{chunk-HGOYQUT7.js → chunk-WZKEU7WR.js} +4 -2
  73. package/dist/bundle/{chunk-QR5VQXQ5.js → chunk-XEW2EN6F.js} +51 -37
  74. package/dist/bundle/{chunk-DXPOVLQC.js → chunk-XFRRKZHQ.js} +223 -89
  75. package/dist/bundle/{chunk-XGNC5OJG.js → chunk-XS5POQST.js} +1 -1
  76. package/dist/bundle/{chunk-LARQTWIL.js → chunk-XZUS7XRO.js} +1 -1
  77. package/dist/bundle/{chunk-6SUGANRJ.js → chunk-YALI4C7C.js} +6 -6
  78. package/dist/bundle/{chunk-WIU733D2.js → chunk-YMWENGKH.js} +1 -1
  79. package/dist/bundle/{chunk-CACYL36O.js → chunk-YOJDGAPT.js} +8 -8
  80. package/dist/bundle/{chunk-S4YK6TTG.js → chunk-YPFUYQDP.js} +13 -13
  81. package/dist/bundle/{chunk-3252WXOL.js → chunk-YUWPNG7B.js} +1 -1
  82. package/dist/bundle/{chunk-2RJA4BQB.js → chunk-YXYTY4GF.js} +39 -26
  83. package/dist/bundle/{chunk-YPF6OS37.js → chunk-ZMOUUOT2.js} +1 -1
  84. package/dist/bundle/command-contract-OB5BRABN.js +39 -0
  85. package/dist/bundle/{decode-62A3HGPW.js → decode-WIIX3Y2X.js} +8 -8
  86. package/dist/bundle/{dispatch-IE7PBEQC.js → dispatch-GEFIXA6X.js} +9 -9
  87. package/dist/bundle/drive.js +11 -11
  88. package/dist/bundle/{echarts-BGBPRGR5.js → echarts-OYINM4C4.js} +2 -2
  89. package/dist/bundle/{embed-J3IBVV2V.js → embed-DWZIYMBX.js} +9 -9
  90. package/dist/bundle/{embedder-QFPMDRT2.js → embedder-ILWH7ZRM.js} +12 -12
  91. package/dist/bundle/entry-V5V3TOTY.js +22 -0
  92. package/dist/bundle/{failure-BKOGBMIC.js → failure-GV77W3CD.js} +4 -4
  93. package/dist/bundle/first-run-V3VVLQF4.js +30 -0
  94. package/dist/bundle/first-screen-Y3RIN7FU.js +37 -0
  95. package/dist/bundle/{google-RXM2XEPD.js → google-KLZSUAVY.js} +13 -13
  96. package/dist/bundle/{google-api-NC65BZO4.js → google-api-HZQ5R4ZO.js} +57 -57
  97. package/dist/bundle/grants-L7XLHLUT.js +105 -0
  98. package/dist/bundle/{identity-PI6F2GWA.js → identity-J2DON4IO.js} +6 -6
  99. package/dist/bundle/{instructions-6LPDSKAD.js → instructions-HGOJ23AJ.js} +1 -1
  100. package/dist/bundle/{login-HTY7GT2S.js → login-BD2TS4GY.js} +63 -63
  101. package/dist/bundle/{mcp-PPVOM4SE.js → mcp-GWDA3HOA.js} +2 -2
  102. package/dist/bundle/{node-IB246NCQ.js → node-CPKTDPH7.js} +2 -2
  103. package/dist/bundle/{node-sqlite-G2Y5SFJM.js → node-sqlite-IXDCRLSX.js} +9 -9
  104. package/dist/bundle/oauth-HOGY4YBB.js +22 -0
  105. package/dist/bundle/{open-WD4GFSJD.js → open-O7P3ZV3Y.js} +8 -8
  106. package/dist/bundle/{openai-QVM4PMY7.js → openai-RCFQKCXC.js} +17 -17
  107. package/dist/bundle/{process-SWPJGPQC.js → process-KXDRJO22.js} +1 -1
  108. package/dist/bundle/{program-WHYFAMXR.js → program-UCHFC7JQ.js} +228 -85
  109. package/dist/bundle/prompt-EVPPBN5W.js +17 -0
  110. package/dist/bundle/{reasons-Q34DQWB6.js → reasons-57J2D77K.js} +5 -5
  111. package/dist/bundle/{recognize-DM3YWHSE.js → recognize-MRCYGP2J.js} +7 -7
  112. package/dist/bundle/{remote-KXVWRK7J.js → remote-L3L4PHKF.js} +10 -10
  113. package/dist/bundle/{rerank-TINXM3MY.js → rerank-PSOE6XFT.js} +10 -10
  114. package/dist/bundle/{serve-IY2WL656.js → serve-72OGS3BF.js} +12 -12
  115. package/dist/bundle/server-C5TGNFXW.js +70 -0
  116. package/dist/bundle/{server-VPY3OWPC.js → server-SCXKYHBO.js} +44 -44
  117. package/dist/bundle/{services-PXNBOCOC.js → services-YAFTELBI.js} +42 -32
  118. package/dist/bundle/{sqlite-runtime-5ZK2CV7Y.js → sqlite-runtime-DLK4SU33.js} +9 -9
  119. package/dist/bundle/{start-LDVCN3DK.js → start-AFFA3LKM.js} +9 -7
  120. package/dist/bundle/{state-3MKTT3VS.js → state-T5VNAJSZ.js} +9 -9
  121. package/dist/bundle/{store-7M4MSUJV.js → store-4OFK7PKQ.js} +48 -28
  122. package/dist/bundle/{store-4VQOT5IJ.js → store-R6MSY2IM.js} +20 -18
  123. package/dist/bundle/store-maintenance-command-QDMCXGV6.js +60 -0
  124. package/dist/bundle/tokens-HIG36RNS.js +103 -0
  125. package/dist/commands/folders.d.ts +2 -1
  126. package/dist/commands/folders.d.ts.map +1 -1
  127. package/dist/commands/folders.js +16 -3
  128. package/dist/commands/folders.js.map +1 -1
  129. package/dist/program.js +1 -1
  130. package/dist/program.js.map +1 -1
  131. package/dist/tokens.d.ts.map +1 -1
  132. package/dist/tokens.js +15 -6
  133. package/dist/tokens.js.map +1 -1
  134. package/dist/version.d.ts +1 -1
  135. package/dist/version.js +1 -1
  136. package/package.json +3 -3
  137. package/dist/bundle/chunk-W767AUNR.js +0 -132
  138. package/dist/bundle/command-contract-T3EO5AYD.js +0 -39
  139. package/dist/bundle/entry-YQSYER66.js +0 -22
  140. package/dist/bundle/first-run-ZIFPVZAI.js +0 -30
  141. package/dist/bundle/first-screen-L5U26EY7.js +0 -37
  142. package/dist/bundle/grants-SEWUYYH3.js +0 -105
  143. package/dist/bundle/oauth-MWBKBI4T.js +0 -22
  144. package/dist/bundle/prompt-OVYCGZB7.js +0 -17
  145. package/dist/bundle/server-EMWVVT2C.js +0 -70
  146. package/dist/bundle/store-maintenance-command-NRATYBWD.js +0 -60
  147. package/dist/bundle/tokens-XUKLM3SL.js +0 -103
  148. /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-ZQ3GWKDQ.js} +0 -0
@@ -9,18 +9,18 @@ import {
9
9
  providerErrorKey,
10
10
  renderEvent,
11
11
  runContextOf
12
- } from "./chunk-BF6TQMNB.js";
12
+ } from "./chunk-VQDD64A4.js";
13
13
  import {
14
14
  permissionCeiling
15
- } from "./chunk-XGMDWIUP.js";
15
+ } from "./chunk-MN4VXU3M.js";
16
16
  import {
17
17
  envName,
18
18
  readOnlyLockOf,
19
19
  readOnlyRefusal
20
- } from "./chunk-ECEYAQGN.js";
20
+ } from "./chunk-7W5HYGVW.js";
21
21
  import {
22
22
  carries
23
- } from "./chunk-WIU733D2.js";
23
+ } from "./chunk-YMWENGKH.js";
24
24
  import {
25
25
  CEILING_KEY,
26
26
  COMMAND_PATH_KEY,
@@ -62,33 +62,26 @@ import {
62
62
  typedCommand,
63
63
  useAsProcessRun,
64
64
  withWriteScope
65
- } from "./chunk-6DN4VPA7.js";
65
+ } from "./chunk-VAYB52HF.js";
66
66
  import {
67
67
  isCliFailure
68
- } from "./chunk-BCWUDTYQ.js";
68
+ } from "./chunk-AQVUEZEP.js";
69
69
  import {
70
- author,
71
- count,
72
- evidenceSource,
73
- id,
74
- note,
75
- organization,
76
- project,
77
- providerMetadata,
78
- reminder,
79
- text,
80
- time,
81
- untrusted
82
- } from "./chunk-W767AUNR.js";
70
+ note
71
+ } from "./chunk-RIDQNVZM.js";
83
72
  import {
84
73
  FACT_STATUSES,
85
74
  FACT_TYPES,
75
+ INVOICE_DIRECTIONS,
86
76
  LINK_KINDS,
87
77
  LINK_SOURCES,
88
78
  MEETING_RESULT_ENTITIES,
89
79
  MEMORY_KINDS,
90
80
  MEMORY_SCOPES,
91
81
  MEMORY_STATUSES,
82
+ MONEY_DIRECTIONS,
83
+ ORDER_PURPOSES,
84
+ ORDER_STATUSES,
92
85
  PRIORITY_LABELS,
93
86
  RELATION_KINDS,
94
87
  TASK_KINDS,
@@ -97,7 +90,11 @@ import {
97
90
  TASK_TYPES,
98
91
  TASK_VERDICTS,
99
92
  WORK_TASK_TYPES,
93
+ author,
94
+ count,
100
95
  event,
96
+ evidenceSource,
97
+ id,
101
98
  meeting,
102
99
  meetingCounts,
103
100
  meetingDetails,
@@ -110,19 +107,26 @@ import {
110
107
  meetingSpeaker,
111
108
  meetingStats,
112
109
  meetingSummary,
113
- meetingTranscript
114
- } from "./chunk-K7LS3NGM.js";
110
+ meetingTranscript,
111
+ organization,
112
+ project,
113
+ providerMetadata,
114
+ reminder,
115
+ text,
116
+ time,
117
+ untrusted
118
+ } from "./chunk-CJHY5YIF.js";
115
119
  import {
116
120
  FIELD_TYPES,
117
121
  QUERY_BACKENDS,
118
122
  describeQuery
119
- } from "./chunk-NZ2EIZLX.js";
123
+ } from "./chunk-EOOGWUTP.js";
120
124
  import {
121
125
  sharedConfigPath
122
- } from "./chunk-X2CXW4HM.js";
126
+ } from "./chunk-TDX4GZFO.js";
123
127
  import {
124
128
  storePath
125
- } from "./chunk-I26VL4W7.js";
129
+ } from "./chunk-FNWIJ6EJ.js";
126
130
  import {
127
131
  configFilePath,
128
132
  createRecordLog,
@@ -133,19 +137,19 @@ import {
133
137
  resolvePaths,
134
138
  saveConfigFile,
135
139
  writeSecurely
136
- } from "./chunk-DCBFNBEB.js";
140
+ } from "./chunk-OD4U7GUY.js";
137
141
  import {
138
142
  EXIT_CODES,
139
143
  GENERIC_FAILURE,
140
144
  exitCodeOfAnswer
141
- } from "./chunk-J4HQVHMN.js";
145
+ } from "./chunk-UQLWMGSD.js";
142
146
  import {
143
147
  singleLine,
144
148
  visibleControls
145
- } from "./chunk-6IBM4Z3V.js";
149
+ } from "./chunk-2HF2MRXI.js";
146
150
  import {
147
151
  defineLogEvents
148
- } from "./chunk-OFFA54TW.js";
152
+ } from "./chunk-6EY46GAN.js";
149
153
  import {
150
154
  COMPACT_FLAG,
151
155
  MAX_NEXT_STEPS,
@@ -196,15 +200,15 @@ import {
196
200
  unwrap,
197
201
  variant,
198
202
  writes
199
- } from "./chunk-VYXVPYA3.js";
203
+ } from "./chunk-FEZF3TII.js";
200
204
  import {
201
205
  CliError
202
- } from "./chunk-WZ5XK74U.js";
206
+ } from "./chunk-4OSSOWDM.js";
203
207
  import {
204
208
  __name
205
209
  } from "./chunk-ZVVMGPBJ.js";
206
210
 
207
- // 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/commands/registry.js
211
+ // 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/commands/registry.js
208
212
  var labels = /* @__PURE__ */ new WeakMap();
209
213
  var annotate = /* @__PURE__ */ __name((command, meta) => {
210
214
  labels.set(command, { ...labels.get(command), ...meta });
@@ -3705,7 +3709,7 @@ __name(useColor, "useColor");
3705
3709
  // node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
3706
3710
  var program = new Command();
3707
3711
 
3708
- // 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/commands/contracts.js
3712
+ // 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/commands/contracts.js
3709
3713
  import { isDeepStrictEqual } from "node:util";
3710
3714
  var protectedCommands = /* @__PURE__ */ new WeakMap();
3711
3715
  var hasSharedContract = /* @__PURE__ */ __name((command) => protectedCommands.has(command), "hasSharedContract");
@@ -3891,8 +3895,8 @@ var customizeSharedCommand = /* @__PURE__ */ __name((reference2, reason, build,
3891
3895
  }
3892
3896
  }, "adopt");
3893
3897
  adopt(reference2, command);
3894
- const ordered = /* @__PURE__ */ __name((records) => [...records].sort((a, b) => JSON.stringify([a.command, a.field]).localeCompare(JSON.stringify([b.command, b.field]))), "ordered");
3895
- if (!Array.isArray(expectedOverrides) || !same(ordered(edits), ordered(expectedOverrides)))
3898
+ const ordered2 = /* @__PURE__ */ __name((records) => [...records].sort((a, b) => JSON.stringify([a.command, a.field]).localeCompare(JSON.stringify([b.command, b.field]))), "ordered");
3899
+ if (!Array.isArray(expectedOverrides) || !same(ordered2(edits), ordered2(expectedOverrides)))
3896
3900
  throw new CliError("configuration_error", `provider shell ${command.name()} differs from its reviewed shared contract overrides; review Core and provider definitions before updating the explicit declarations`, { reason: "contract.unacknowledged-override", expected: expectedOverrides ?? null, actual: edits });
3897
3901
  for (const { command: own, record: record2 } of pending) {
3898
3902
  protectedCommands.set(own, record2);
@@ -3907,7 +3911,7 @@ var customizeSharedCommand = /* @__PURE__ */ __name((reference2, reason, build,
3907
3911
  return command;
3908
3912
  }, "customizeSharedCommand");
3909
3913
 
3910
- // 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/commands/document.js
3914
+ // 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/commands/document.js
3911
3915
  var argumentInfoSchema = object({
3912
3916
  name: string(),
3913
3917
  required: boolean(),
@@ -3990,7 +3994,7 @@ var commandsDocument = /* @__PURE__ */ __name((root, about) => ({
3990
3994
  exit_codes: { ok: 0, internal_error: GENERIC_FAILURE, ...EXIT_CODES }
3991
3995
  }), "commandsDocument");
3992
3996
 
3993
- // 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/commands/index.js
3997
+ // 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/commands/index.js
3994
3998
  var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
3995
3999
  let command = root;
3996
4000
  const path2 = [];
@@ -4008,7 +4012,7 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
4008
4012
  }
4009
4013
  }, "refuseJoinedPath");
4010
4014
 
4011
- // 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/cli/result-fields.js
4015
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/result-fields.js
4012
4016
  var named = /* @__PURE__ */ __name((work) => {
4013
4017
  try {
4014
4018
  return work();
@@ -4035,7 +4039,7 @@ var projectFields2 = /* @__PURE__ */ __name((value, fields) => named(() => {
4035
4039
  return projectFields(value, fields);
4036
4040
  }), "projectFields");
4037
4041
 
4038
- // 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/cli/execution.js
4042
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/execution.js
4039
4043
  var DEFAULT_COMMAND_MS = 3e4;
4040
4044
  var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
4041
4045
  var DEFAULT_SYNC_MS = 15 * 6e4;
@@ -4218,7 +4222,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
4218
4222
  }
4219
4223
  }, "withAbort");
4220
4224
 
4221
- // 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/cli/profile.js
4225
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/profile.js
4222
4226
  var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
4223
4227
  var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
4224
4228
  var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
@@ -4287,7 +4291,7 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
4287
4291
  return void 0;
4288
4292
  }, "sampleCommand");
4289
4293
 
4290
- // 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/cli/messenger/accounts.js
4294
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
4291
4295
  import { existsSync, readdirSync, readFileSync } from "node:fs";
4292
4296
  import { join } from "node:path";
4293
4297
  var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
@@ -4309,7 +4313,7 @@ var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
4309
4313
  }, "profilesWithAccounts");
4310
4314
  var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
4311
4315
 
4312
- // 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/output-detail.js
4316
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/output-detail.js
4313
4317
  var RARELY_SET = ["editedAt", "replyTo", "forwardedFrom", "reactions"];
4314
4318
  var BRIEF = ["locator", "chatTitle", "timestamp", "senderName", "excerpt", "score"];
4315
4319
  var SNAKE_BRIEF = ["ref", "chat_title", "timestamp", "sender_name", "excerpt", "score"];
@@ -4345,7 +4349,7 @@ var atDetail = /* @__PURE__ */ __name((value, detail = "default") => {
4345
4349
  return value;
4346
4350
  }, "atDetail");
4347
4351
 
4348
- // 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/output.js
4352
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/output.js
4349
4353
  var refuseCompact = /* @__PURE__ */ __name(({ json, jsonl, fields, hitDetail }) => {
4350
4354
  const other = jsonl ? "--jsonl" : fields !== void 0 ? "--json=\u2026" : json ? "--json" : hitDetail === "brief" ? "--brief" : "";
4351
4355
  if (other)
@@ -4409,7 +4413,7 @@ var silence = /* @__PURE__ */ __name((renderer) => ({
4409
4413
  }, "warn")
4410
4414
  }), "silence");
4411
4415
 
4412
- // 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/runs/log-events.js
4416
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/runs/log-events.js
4413
4417
  var CORE_LOG_EVENTS = defineLogEvents([
4414
4418
  { id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
4415
4419
  { id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
@@ -4443,7 +4447,7 @@ var DIAGNOSTIC_LOG_EVENTS = {
4443
4447
  cache: "cache.answered"
4444
4448
  };
4445
4449
 
4446
- // 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/runs/recording.js
4450
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/runs/recording.js
4447
4451
  var recorded = /* @__PURE__ */ __name(async (options, body) => {
4448
4452
  const recording = startRecording(options);
4449
4453
  try {
@@ -4628,7 +4632,7 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
4628
4632
  return void 0;
4629
4633
  }, "partialOutcome");
4630
4634
 
4631
- // 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/cli/deadline.js
4635
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/deadline.js
4632
4636
  var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
4633
4637
  if (ms2 === void 0)
4634
4638
  return body();
@@ -4654,10 +4658,10 @@ var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
4654
4658
  }
4655
4659
  }, "withDeadline");
4656
4660
 
4657
- // 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/cli/settings.js
4658
- import { existsSync as existsSync3 } from "node:fs";
4661
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/settings.js
4662
+ import { existsSync as existsSync4 } from "node:fs";
4659
4663
 
4660
- // 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/models/endpoint.js
4664
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/models/endpoint.js
4661
4665
  var endpoint = /* @__PURE__ */ __name((value) => {
4662
4666
  try {
4663
4667
  const url2 = new URL(value);
@@ -4667,7 +4671,7 @@ var endpoint = /* @__PURE__ */ __name((value) => {
4667
4671
  }
4668
4672
  }, "endpoint");
4669
4673
 
4670
- // 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/models/settings.js
4674
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/models/settings.js
4671
4675
  var MODEL_FIELDS = ["provider", "model", "base_url"];
4672
4676
  var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
4673
4677
  provider: optional(picklist(["off", "openai", "anthropic"])),
@@ -4736,7 +4740,7 @@ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
4736
4740
  };
4737
4741
  }, "modelTarget");
4738
4742
 
4739
- // 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/analysis/settings.js
4743
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/analysis/settings.js
4740
4744
  var model = pipe(string(), trim(), minLength(1), maxLength(200));
4741
4745
  var url = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
4742
4746
  var AI_FIELDS = {
@@ -4780,10 +4784,99 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
4780
4784
  };
4781
4785
  }, "resolveAISettings");
4782
4786
 
4783
- // 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/cli/config-issues.js
4784
- import { readFileSync as readFileSync2 } from "node:fs";
4787
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/bot/registry.js
4788
+ import { existsSync as existsSync2, readdirSync as readdirSync2, readFileSync as readFileSync2 } from "node:fs";
4789
+ import { join as join2 } from "node:path";
4790
+ var botsDirectory = /* @__PURE__ */ __name((app, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "bots"), "botsDirectory");
4791
+ var botFiles = /* @__PURE__ */ __name((app, profile, env = process.env) => {
4792
+ const directory = botsDirectory(app, env);
4793
+ return {
4794
+ registry: join2(directory, `${profile}.json`),
4795
+ recipients: join2(directory, "recipients", `${profile}.json`),
4796
+ journal: join2(directory, "sends", `${profile}.jsonl`),
4797
+ updates: join2(directory, "updates", `${profile}.json`),
4798
+ presses: join2(directory, "presses", `${profile}.json`),
4799
+ checks: join2(directory, "checks", `${profile}.json`)
4800
+ };
4801
+ }, "botFiles");
4802
+ var ChatRegistry = class {
4803
+ static {
4804
+ __name(this, "ChatRegistry");
4805
+ }
4806
+ #path;
4807
+ constructor(app, profile, env = process.env) {
4808
+ this.#path = botFiles(app, profile, env).registry;
4809
+ }
4810
+ list(filter = {}) {
4811
+ const { chats } = this.#read();
4812
+ return (Array.isArray(chats) ? chats : []).filter((chat2) => (filter.id === void 0 || chat2.id === filter.id) && (filter.kind === void 0 || chat2.kind === filter.kind) && (filter.title === void 0 || chat2.title?.toLocaleLowerCase() === filter.title?.toLocaleLowerCase()));
4813
+ }
4814
+ /** The bot's own user id, once any command has learned it — the key its messages are stored under. */
4815
+ botId() {
4816
+ const { botId } = this.#read();
4817
+ return typeof botId === "string" ? botId : void 0;
4818
+ }
4819
+ rememberBot(id6) {
4820
+ const file = this.#read();
4821
+ if (file.botId !== id6)
4822
+ this.#write({ ...file, botId: id6 });
4823
+ }
4824
+ /** Makes this bot known to `bot list` before it has seen any chat. */
4825
+ touch() {
4826
+ if (!existsSync2(this.#path))
4827
+ writeSecurely(this.#path, `${JSON.stringify({ chats: [] }, null, 2)}
4828
+ `, 384);
4829
+ }
4830
+ /** Newer facts win; a chat seen only as an id keeps the title it had. */
4831
+ observe(chats, now = /* @__PURE__ */ new Date()) {
4832
+ if (chats.length === 0)
4833
+ return;
4834
+ const byId = new Map(this.list().map((chat2) => [chat2.id, chat2]));
4835
+ const at2 = now.toISOString();
4836
+ for (const chat2 of chats) {
4837
+ const known = byId.get(chat2.id);
4838
+ const defined = Object.fromEntries(Object.entries(chat2).filter(([, value]) => value !== void 0 && value !== null));
4839
+ byId.set(chat2.id, {
4840
+ title: null,
4841
+ kind: "unknown",
4842
+ unreadCount: null,
4843
+ lastMessageAt: null,
4844
+ participantsCount: null,
4845
+ ...known,
4846
+ ...defined,
4847
+ id: chat2.id,
4848
+ firstSeenAt: known?.firstSeenAt ?? at2,
4849
+ lastSeenAt: at2
4850
+ });
4851
+ }
4852
+ this.#write({ ...this.#read(), chats: [...byId.values()] });
4853
+ }
4854
+ #read() {
4855
+ if (!existsSync2(this.#path))
4856
+ return {};
4857
+ try {
4858
+ const parsed = JSON.parse(readFileSync2(this.#path, "utf8"));
4859
+ return parsed && typeof parsed === "object" ? parsed : {};
4860
+ } catch {
4861
+ return {};
4862
+ }
4863
+ }
4864
+ #write(file) {
4865
+ writeSecurely(this.#path, `${JSON.stringify(file, null, 2)}
4866
+ `, 384);
4867
+ }
4868
+ };
4869
+ var registryProfiles = /* @__PURE__ */ __name((app, env = process.env) => {
4870
+ const directory = botsDirectory(app, env);
4871
+ if (!existsSync2(directory))
4872
+ return [];
4873
+ return readdirSync2(directory, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => entry.name).map((name) => name.slice(0, -".json".length));
4874
+ }, "registryProfiles");
4875
+
4876
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
4877
+ import { readFileSync as readFileSync3 } from "node:fs";
4785
4878
 
4786
- // 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/cli/config-repair.js
4879
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/config-repair.js
4787
4880
  var REPAIR_WORDS = {
4788
4881
  byte_order_mark: "an invisible byte-order mark at the start",
4789
4882
  comment: "a comment, which JSON does not allow",
@@ -5024,7 +5117,7 @@ ${parts.join(",\n")}
5024
5117
  ${indent}${close}`;
5025
5118
  }, "serialise");
5026
5119
 
5027
- // 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/cli/config-issues.js
5120
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
5028
5121
  var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
5029
5122
  var SECTIONS = ["personal", "bot"];
5030
5123
  var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
@@ -5298,7 +5391,7 @@ var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schem
5298
5391
  var wholeFile = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what }), "wholeFile");
5299
5392
  var readConfigText = /* @__PURE__ */ __name((path2) => {
5300
5393
  try {
5301
- return { text: readFileSync2(path2, "utf8") };
5394
+ return { text: readFileSync3(path2, "utf8") };
5302
5395
  } catch (error) {
5303
5396
  const code = error.code;
5304
5397
  if (code === "ENOENT")
@@ -5318,20 +5411,20 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
5318
5411
  return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
5319
5412
  }, "readConfigFile");
5320
5413
 
5321
- // 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/cli/default-config.js
5322
- import { existsSync as existsSync2, linkSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
5323
- import { dirname, join as join2 } from "node:path";
5414
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/default-config.js
5415
+ import { existsSync as existsSync3, linkSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
5416
+ import { dirname, join as join3 } from "node:path";
5324
5417
  var DEFAULT_CONFIG = {
5325
5418
  defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
5326
5419
  profiles: {}
5327
5420
  };
5328
5421
  function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
5329
- if (existsSync2(path2))
5422
+ if (existsSync3(path2))
5330
5423
  return;
5331
5424
  const directory = dirname(path2);
5332
5425
  mkdirSync(directory, { recursive: true, mode: 448 });
5333
- const temporary = mkdtempSync(join2(directory, ".config-"));
5334
- const candidate = join2(temporary, "config.json");
5426
+ const temporary = mkdtempSync(join3(directory, ".config-"));
5427
+ const candidate = join3(temporary, "config.json");
5335
5428
  try {
5336
5429
  writeFileSync(candidate, `${JSON.stringify(config, null, 2)}
5337
5430
  `, { flag: "wx", mode: 384 });
@@ -5347,7 +5440,7 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
5347
5440
  }
5348
5441
  __name(ensureDefaultConfig, "ensureDefaultConfig");
5349
5442
 
5350
- // 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/cli/setting-defaults.js
5443
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
5351
5444
  var isNode2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
5352
5445
  var parentOf = /* @__PURE__ */ __name((config, key) => {
5353
5446
  const path2 = key.split(".");
@@ -5380,7 +5473,7 @@ var settingRows = /* @__PURE__ */ __name((raw, declared) => declared.map((settin
5380
5473
  };
5381
5474
  }), "settingRows");
5382
5475
 
5383
- // 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/cli/settings.js
5476
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/settings.js
5384
5477
  var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
5385
5478
  var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
5386
5479
  var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
@@ -5606,6 +5699,15 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
5606
5699
  throw new CliError("validation_error", `name a profile: \`${app.command} <profile> \u2026\` \u2014 profiles here: ${here.join(", ")} (or set ${PROFILE})`, { profiles: here });
5607
5700
  }, "unnamed");
5608
5701
  const profilesOf = /* @__PURE__ */ __name((config, env) => profilesHere(app, [...namedProfiles(config), ...extension.profiles?.(env) ?? []], env), "profilesOf");
5702
+ const botsOf = /* @__PURE__ */ __name((config, env) => [.../* @__PURE__ */ new Set([...Object.keys(config.bot?.profiles ?? {}), ...registryProfiles(app, env)])].sort(), "botsOf");
5703
+ const accountsOf = /* @__PURE__ */ __name((config, env, bots) => {
5704
+ const personal = /* @__PURE__ */ new Set([
5705
+ ...Object.keys(config.personal?.profiles ?? {}),
5706
+ ...profilesWithAccounts(app, env),
5707
+ ...extension.profiles?.(env) ?? []
5708
+ ]);
5709
+ return profilesOf(config, env).filter((name) => !bots.includes(name) || personal.has(name));
5710
+ }, "accountsOf");
5609
5711
  const resolveSettings = /* @__PURE__ */ __name((flags = {}, options = {}) => {
5610
5712
  const env = options.env ?? process.env;
5611
5713
  const configPath = configPathFor(options);
@@ -5627,6 +5729,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
5627
5729
  ], void 0);
5628
5730
  const profile = locked(named3.value === void 0 ? unnamed(config, env, options.needsProfile !== false) : { value: named3.value, from: named3.from }, lock);
5629
5731
  const kind2 = options.kind ?? "personal";
5732
+ const bots = botsOf(config, env);
5630
5733
  const name = usableProfileName(profile.value);
5631
5734
  const configured = config.profiles[name] ?? {};
5632
5735
  const shared = config.defaults ?? {};
@@ -5718,9 +5821,11 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
5718
5821
  updateCheck: updateCheck.value,
5719
5822
  skillHint: skillHint.value,
5720
5823
  configPath,
5721
- configFound: existsSync3(configPath),
5824
+ configFound: existsSync4(configPath),
5722
5825
  configuredProfiles: namedProfiles(config),
5723
5826
  profilesHere: profilesOf(config, env),
5827
+ accountProfiles: accountsOf(config, env, bots),
5828
+ botProfiles: bots,
5724
5829
  sources: {
5725
5830
  ...ai.sources,
5726
5831
  profile: profile.from,
@@ -5803,10 +5908,20 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
5803
5908
  if (kind2 !== "bot" && botOnlyKeys.includes(setting2)) {
5804
5909
  throw new CliError("validation_error", `${setting2} is a bot's setting \u2014 add --bot`);
5805
5910
  }
5806
- const changed = structuredClone(raw);
5807
- setAt(changed, at2, level2 === void 0 ? parseValue(value) : value.trim());
5808
5911
  const had = new Set(before.map((issue) => issue.at.join(".")));
5809
- const added = schemaIssues(changed, readSchema, context2(path2)).find((issue) => !had.has(issue.at.join(".")) || issue.at.join(".") === at2.join("."));
5912
+ const tried = /* @__PURE__ */ __name((typed2) => {
5913
+ const changed2 = structuredClone(raw);
5914
+ setAt(changed2, at2, typed2);
5915
+ const added2 = schemaIssues(changed2, readSchema, context2(path2)).find((issue) => !had.has(issue.at.join(".")) || issue.at.join(".") === at2.join("."));
5916
+ return { changed: changed2, added: added2 };
5917
+ }, "tried");
5918
+ const parsed = level2 === void 0 ? parseValue(value) : value.trim();
5919
+ let { changed, added } = tried(parsed);
5920
+ if (added && typeof parsed !== "string") {
5921
+ const asText = tried(value.trim());
5922
+ if (!asText.added)
5923
+ ({ changed, added } = asText);
5924
+ }
5810
5925
  if (added)
5811
5926
  throw new CliError("validation_error", `${setting2} cannot be "${value}": ${added.what}`);
5812
5927
  const checked = safeParse(readSchema, changed);
@@ -5868,7 +5983,7 @@ var given = /* @__PURE__ */ __name((value) => {
5868
5983
  return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
5869
5984
  }, "given");
5870
5985
 
5871
- // 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/cli/context.js
5986
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/context.js
5872
5987
  var setExitCode = /* @__PURE__ */ __name((command, code) => {
5873
5988
  const slot = environmentOf(command).exit;
5874
5989
  if (slot)
@@ -5881,6 +5996,10 @@ var provide = /* @__PURE__ */ __name((program2, environment) => {
5881
5996
  environments.set(program2, environment);
5882
5997
  }, "provide");
5883
5998
  var environmentOf = /* @__PURE__ */ __name((command) => environments.get(rootOf(command)) ?? {}, "environmentOf");
5999
+ var withAgentLevels = /* @__PURE__ */ __name((command, flags) => {
6000
+ const overrides = environmentOf(command).agent?.overrides ?? [];
6001
+ return overrides.length > 0 ? { ...flags, permission: [...overrides, ...flags.permission ?? []] } : flags;
6002
+ }, "withAgentLevels");
5884
6003
  var secretInputOf = /* @__PURE__ */ __name((command) => {
5885
6004
  const { stdin, stderr } = environmentOf(command);
5886
6005
  return { ...stdin ? { input: stdin } : {}, ...stderr ? { output: stderr } : {} };
@@ -5907,9 +6026,7 @@ var outputFor = /* @__PURE__ */ __name((command) => {
5907
6026
  var baseContext = /* @__PURE__ */ __name((command, resolveSettings) => {
5908
6027
  const environment = environmentOf(command);
5909
6028
  const env = environment.env ?? process.env;
5910
- const flags = command.optsWithGlobals();
5911
- const overrides = environment.agent?.overrides ?? [];
5912
- const settings = resolveSettings(overrides.length > 0 ? { ...flags, permission: [...overrides, ...flags.permission ?? []] } : flags, { env });
6029
+ const settings = resolveSettings(withAgentLevels(command, command.optsWithGlobals()), { env });
5913
6030
  const { renderer, format, color, streams, compact, full } = resolveOutput({
5914
6031
  ...settings,
5915
6032
  env,
@@ -5974,6 +6091,13 @@ var baseContext = /* @__PURE__ */ __name((command, resolveSettings) => {
5974
6091
  }, "track")
5975
6092
  };
5976
6093
  }, "baseContext");
6094
+ var inCommandRun = /* @__PURE__ */ __name((command, body) => {
6095
+ const { resolveSettings } = environmentOf(command);
6096
+ if (!resolveSettings)
6097
+ return body(() => {
6098
+ });
6099
+ return baseContext(command, (flags, options) => resolveSettings(flags, { ...options, needsProfile: false })).run(body);
6100
+ }, "inCommandRun");
5977
6101
  var commandPath = /* @__PURE__ */ __name((command) => {
5978
6102
  const words = [];
5979
6103
  for (let current = command; current?.parent; current = current.parent)
@@ -5981,7 +6105,7 @@ var commandPath = /* @__PURE__ */ __name((command) => {
5981
6105
  return words.join(" ");
5982
6106
  }, "commandPath");
5983
6107
 
5984
- // 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/cli/effects.js
6108
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/effects.js
5985
6109
  var REMOTE_READ = { remote: "read", local: "read" };
5986
6110
  var FETCH = { remote: "read", local: "write" };
5987
6111
  var REMOTE_WRITE = { remote: "write", local: "write" };
@@ -6021,6 +6145,14 @@ var isProposal = /* @__PURE__ */ __name((command) => {
6021
6145
  const path2 = pathOf2(command).join(" ");
6022
6146
  return PROPOSE_COMMANDS.some((listed) => path2 === listed || path2.endsWith(` ${listed}`));
6023
6147
  }, "isProposal");
6148
+ var LOCKED_AUTHORITY_COMMANDS = ["rules add"];
6149
+ var NARROWS = /* @__PURE__ */ new WeakSet();
6150
+ var admittedUnderLock = /* @__PURE__ */ __name((command) => {
6151
+ if (!NARROWS.has(command))
6152
+ return false;
6153
+ const path2 = pathOf2(command).join(" ");
6154
+ return LOCKED_AUTHORITY_COMMANDS.some((listed) => path2 === listed || path2.endsWith(` ${listed}`));
6155
+ }, "admittedUnderLock");
6024
6156
  var STORE_WRITES = /* @__PURE__ */ new WeakSet();
6025
6157
  var changesStore = /* @__PURE__ */ __name((command) => {
6026
6158
  STORE_WRITES.add(command);
@@ -6032,6 +6164,14 @@ var fetchesOnly = /* @__PURE__ */ __name((command) => {
6032
6164
  return effects?.remote === "read" && effects.local === "write" && !STORE_WRITES.has(command) && !changesAuthority(command) && !OTHER_SERVICE.has(command) && !savesFiles(command);
6033
6165
  }, "fetchesOnly");
6034
6166
  var FILE_OPTION = /* @__PURE__ */ new WeakMap();
6167
+ var writesFileOnlyWith = /* @__PURE__ */ __name((command, option) => {
6168
+ const flag2 = command.options.find((one) => one.attributeName() === option);
6169
+ if (!flag2 || optionMetaOf(flag2).mcp !== false)
6170
+ throw new Error(`${command.name()}: writesFileOnlyWith needs --${option} added first, as an owner-only option`);
6171
+ FILE_OPTION.set(command, option);
6172
+ return command;
6173
+ }, "writesFileOnlyWith");
6174
+ var writesNewFileOnlyWith = /* @__PURE__ */ __name((command, option) => destroysNothing(writesFileOnlyWith(command, option)), "writesNewFileOnlyWith");
6035
6175
  var writesFileNow = /* @__PURE__ */ __name((command) => {
6036
6176
  const option = FILE_OPTION.get(command);
6037
6177
  return option === void 0 || command.opts()[option] !== void 0;
@@ -6093,7 +6233,7 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
6093
6233
  throw readOnlyRefusal(lock, what);
6094
6234
  }, "refuseUnderReadOnly");
6095
6235
 
6096
- // 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/entities/account.js
6236
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/account.js
6097
6237
  var account = strictObject({
6098
6238
  provider: text,
6099
6239
  id,
@@ -6103,7 +6243,7 @@ var account = strictObject({
6103
6243
  scope: optional(picklist(["personal", "work"]))
6104
6244
  });
6105
6245
 
6106
- // 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/entities/account-session.js
6246
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/account-session.js
6107
6247
  var accountSession = strictObject({
6108
6248
  current: boolean(),
6109
6249
  client: nullable(text),
@@ -6113,7 +6253,7 @@ var accountSession = strictObject({
6113
6253
  created_at: optional(nullable(time))
6114
6254
  });
6115
6255
 
6116
- // 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/entities/account-change.js
6256
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/account-change.js
6117
6257
  var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
6118
6258
  var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
6119
6259
  var audience = picklist(["everyone", "contacts", "nobody"]);
@@ -6131,17 +6271,19 @@ var accountPrivacy = strictObject({
6131
6271
  });
6132
6272
  var accountPrivacyChange = strictObject({ operation_id: id, privacy: accountPrivacy });
6133
6273
 
6134
- // 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/entities/account-profile.js
6274
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
6135
6275
  var accountProfile = strictObject({
6136
6276
  profile: id,
6137
6277
  current: boolean(),
6138
6278
  account: nullable(id),
6139
6279
  name: nullable(text),
6140
6280
  /** False for a profile with no session on this computer; absent when the messenger does not say. */
6141
- signed_in: optional(boolean())
6281
+ signed_in: optional(boolean()),
6282
+ /** True when the same name is a bot profile too (`<tool> <profile> bot …`); absent otherwise. */
6283
+ bot: optional(literal(true))
6142
6284
  });
6143
6285
 
6144
- // 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/entities/counter-reading.js
6286
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
6145
6287
  var milliseconds = pipe(number(), minValue(0));
6146
6288
  var counterReading = strictObject({
6147
6289
  counter: picklist(["views", "reactions", "comments"]),
@@ -6153,7 +6295,7 @@ var counterReading = strictObject({
6153
6295
  });
6154
6296
  var selection = record(string(), unknown());
6155
6297
 
6156
- // 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/entities/admin-report.js
6298
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
6157
6299
  var adminRow = strictObject({
6158
6300
  ref: reference,
6159
6301
  /** What `stats * evidence` takes: a person id, a stay or a message locator. */
@@ -6206,11 +6348,11 @@ var adminReport = strictObject({
6206
6348
  rows: array(adminRow)
6207
6349
  });
6208
6350
 
6209
- // 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/entities/analysis-consent.js
6351
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
6210
6352
  var analysisConsent = strictObject({ chat: id, provider: text, at: time });
6211
6353
  var analysisConsentRevocation = strictObject({ revoked: boolean() });
6212
6354
 
6213
- // 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/entities/batch-result.js
6355
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
6214
6356
  var actionableError = objectWithRest({
6215
6357
  code: text,
6216
6358
  message: text,
@@ -6227,7 +6369,7 @@ var batchResult = strictObject({
6227
6369
  max_error_percent: count
6228
6370
  });
6229
6371
 
6230
- // 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/entities/extraction-report.js
6372
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
6231
6373
  var extractionItem = strictObject({
6232
6374
  ref: reference,
6233
6375
  attachment: count,
@@ -6260,7 +6402,7 @@ var extractionReport = strictObject({
6260
6402
  cursor: optional(text)
6261
6403
  });
6262
6404
 
6263
- // 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/entities/attachment-results.js
6405
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
6264
6406
  var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
6265
6407
  var attachmentBytes = strictObject({
6266
6408
  ref: reference,
@@ -6288,7 +6430,7 @@ var attachmentTextChange = strictObject({
6288
6430
  replaced: nullable(picklist(["extracted", "agent"]))
6289
6431
  });
6290
6432
 
6291
- // 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/entities/chart.js
6433
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/chart.js
6292
6434
  var chart = strictObject({
6293
6435
  version: literal(1),
6294
6436
  kind: picklist(["bar", "line", "grouped-bar"]),
@@ -6303,7 +6445,7 @@ var chart = strictObject({
6303
6445
  file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
6304
6446
  });
6305
6447
 
6306
- // 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/entities/member.js
6448
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/member.js
6307
6449
  var member = strictObject({
6308
6450
  id,
6309
6451
  name: nullable(text),
@@ -6326,7 +6468,7 @@ var member = strictObject({
6326
6468
  check: optional(record(string(), unknown()))
6327
6469
  });
6328
6470
 
6329
- // 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/entities/chat.js
6471
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/chat.js
6330
6472
  var setting = optional(nullable(boolean()));
6331
6473
  var chat = strictObject({
6332
6474
  ref: reference,
@@ -6367,7 +6509,7 @@ var chat = strictObject({
6367
6509
  members: optional(array(member))
6368
6510
  });
6369
6511
 
6370
- // 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/entities/folder.js
6512
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/folder.js
6371
6513
  var named2 = strictObject({
6372
6514
  id,
6373
6515
  title: nullable(text),
@@ -6390,7 +6532,7 @@ var folder = strictObject({
6390
6532
  excluded_chats: optional(array(named2))
6391
6533
  });
6392
6534
 
6393
- // 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/entities/invite-link.js
6535
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
6394
6536
  var inviteLink = strictObject({
6395
6537
  link: text,
6396
6538
  /** Who joins by it asks first, and an admin lets them in. */
@@ -6406,7 +6548,7 @@ var inviteLink = strictObject({
6406
6548
  joined_count: optional(count)
6407
6549
  });
6408
6550
 
6409
- // 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/entities/chat-admin.js
6551
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
6410
6552
  var operated = { operation_id: id, chat_id: id };
6411
6553
  var group = strictObject({
6412
6554
  ...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
@@ -6486,7 +6628,7 @@ var chatFolderOrder = strictObject({
6486
6628
  folders: array(strictObject({ id, title: text }))
6487
6629
  });
6488
6630
 
6489
- // 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/entities/chat-change.js
6631
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
6490
6632
  var operated2 = { operation_id: id, chat_id: id };
6491
6633
  var chatRemoval = strictObject(operated2);
6492
6634
  var chatMuting = strictObject({
@@ -6497,7 +6639,7 @@ var chatArchive = strictObject({ ...operated2, archived: boolean() });
6497
6639
  var chatPin = strictObject({ ...operated2, pinned: boolean() });
6498
6640
  var chatUnread = strictObject({ ...operated2, unread: literal(true) });
6499
6641
 
6500
- // 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/entities/chat-event.js
6642
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
6501
6643
  var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
6502
6644
  var chatEvent = strictObject({
6503
6645
  chat_id: id,
@@ -6514,7 +6656,7 @@ var chatEvent = strictObject({
6514
6656
  before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
6515
6657
  });
6516
6658
 
6517
- // 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/entities/chat-metadata.js
6659
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
6518
6660
  var chatMetadata = strictObject({
6519
6661
  chat_id: id,
6520
6662
  title: nullable(text),
@@ -6529,7 +6671,7 @@ var chatMetadataRefresh = strictObject({
6529
6671
  has_more: boolean()
6530
6672
  });
6531
6673
 
6532
- // 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/entities/chat-moderation.js
6674
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
6533
6675
  var action = picklist(["report", "delete", "remove"]);
6534
6676
  var level = picklist(["deny", "readonly", "ask", "allow"]);
6535
6677
  var chatRules = strictObject({
@@ -6566,7 +6708,7 @@ var chatModeration = strictObject({
6566
6708
  }))
6567
6709
  });
6568
6710
 
6569
- // 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/entities/chat-stats.js
6711
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
6570
6712
  var optionalCount = optional(count);
6571
6713
  var minutes = nullable(number());
6572
6714
  var chatStats = strictObject({
@@ -6640,7 +6782,7 @@ var taskStats = strictObject({
6640
6782
  }))
6641
6783
  });
6642
6784
 
6643
- // 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/entities/chat-tracking.js
6785
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
6644
6786
  var memberCount = strictObject({
6645
6787
  day: pipe(text, isoDate()),
6646
6788
  participants: nullable(count),
@@ -6663,7 +6805,7 @@ var chatTracking = strictObject({
6663
6805
  tracked: boolean()
6664
6806
  });
6665
6807
 
6666
- // 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/entities/contact-read.js
6808
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
6667
6809
  var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
6668
6810
  var contactSync = strictObject({ added: count, changed: count, known: count });
6669
6811
  var profileFields = {
@@ -6701,7 +6843,7 @@ var profileFields = {
6701
6843
  }))
6702
6844
  };
6703
6845
 
6704
- // 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/entities/contact.js
6846
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/contact.js
6705
6847
  var contact = strictObject({
6706
6848
  ref: reference,
6707
6849
  id,
@@ -6732,7 +6874,7 @@ var contact = strictObject({
6732
6874
  notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
6733
6875
  });
6734
6876
 
6735
- // 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/entities/contact-activity.js
6877
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
6736
6878
  var linkedIdentity = strictObject({
6737
6879
  provider: text,
6738
6880
  id,
@@ -6773,7 +6915,7 @@ var contactCheck = strictObject({
6773
6915
  checked_at: time
6774
6916
  });
6775
6917
 
6776
- // 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/entities/message.js
6918
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/message.js
6777
6919
  var quoted = strictObject({
6778
6920
  id,
6779
6921
  sender_id: nullable(id),
@@ -6892,7 +7034,7 @@ var message = strictObject({
6892
7034
  provider_metadata: providerMetadata
6893
7035
  });
6894
7036
 
6895
- // 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/entities/contact-context.js
7037
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
6896
7038
  var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
6897
7039
  var contextMessage = strictObject({
6898
7040
  locator: reference,
@@ -7090,7 +7232,7 @@ var contactPreparation = strictObject({
7090
7232
  })
7091
7233
  });
7092
7234
 
7093
- // 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/entities/contact-note.js
7235
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
7094
7236
  var contactNote = strictObject({
7095
7237
  id,
7096
7238
  /** The contact, as a `contact:` reference. */
@@ -7102,13 +7244,13 @@ var contactNote = strictObject({
7102
7244
  updated_at: time
7103
7245
  });
7104
7246
 
7105
- // 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/entities/contact-write.js
7247
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
7106
7248
  var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
7107
7249
  var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
7108
7250
  var contactStateChange = strictObject({ operation_id: id, person_id: id });
7109
7251
  var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
7110
7252
 
7111
- // 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/entities/conversation-preparation.js
7253
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
7112
7254
  var conversationBuild = strictObject({
7113
7255
  chat: id,
7114
7256
  messages: count,
@@ -7133,7 +7275,7 @@ var catchUpPreparation = strictObject({
7133
7275
  prepared: optional(conversationPreparation)
7134
7276
  });
7135
7277
 
7136
- // 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/entities/conversation-results.js
7278
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
7137
7279
  var conversationDetails = union([
7138
7280
  strictObject({ ...conversation.entries, messages: array(message) }),
7139
7281
  message
@@ -7223,7 +7365,7 @@ var conversationHit = strictObject({
7223
7365
  stale: boolean()
7224
7366
  });
7225
7367
 
7226
- // 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/entities/counters.js
7368
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/counters.js
7227
7369
  var counters = strictObject({
7228
7370
  cutoff: time,
7229
7371
  max_age_ms: milliseconds,
@@ -7253,7 +7395,94 @@ var counterRefresh = strictObject({
7253
7395
  complete: optional(boolean())
7254
7396
  });
7255
7397
 
7256
- // 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/entities/document.js
7398
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/deal.js
7399
+ var nullableText = nullable(text);
7400
+ var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
7401
+ var outcome = picklist(["open", "won", "lost"]);
7402
+ var crmAccount = nullable(strictObject({ provider: text, account: text }));
7403
+ var day = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
7404
+ var deal = strictObject({
7405
+ id,
7406
+ ref: reference,
7407
+ kind: picklist(["deal", "lead"]),
7408
+ title: text,
7409
+ /** One line with the stage, amount and status. */
7410
+ summary: text,
7411
+ pipeline: reference,
7412
+ pipeline_name: text,
7413
+ stage: text,
7414
+ status: outcome,
7415
+ organization: nullable(party),
7416
+ currency: nullableText,
7417
+ amount: nullableText,
7418
+ close_date: day,
7419
+ closed_date: day,
7420
+ closed_reason: nullableText,
7421
+ rank: nullable(number()),
7422
+ /** A lead's deal, once it became one. */
7423
+ deal: nullable(reference),
7424
+ /** The CRM account it is a copy from; `null` for the owner's own. */
7425
+ account: crmAccount,
7426
+ external_id: nullableText,
7427
+ /** A CRM copy's assignee, the identity `<account>/user/<id>`. */
7428
+ assignee: nullableText,
7429
+ /** A CRM copy's own fields by code; a list field's value is its option's label, `option_id` its id. */
7430
+ provider_metadata: record(string(), strictObject({
7431
+ label: nullable(string()),
7432
+ value: unknown(),
7433
+ option_id: optional(union([string(), array(string())]))
7434
+ })),
7435
+ people: array(strictObject({ ...party.entries, role: picklist(["owner", "contact", "decision-maker"]) })),
7436
+ author: strictObject({
7437
+ type: picklist(["person", "bot"]),
7438
+ id,
7439
+ name: nullableText,
7440
+ kind: nullable(picklist(["agent", "rule"]))
7441
+ }),
7442
+ model: nullableText,
7443
+ source: text,
7444
+ reason: nullableText,
7445
+ evidence: array(reference),
7446
+ project: nullable(reference),
7447
+ project_name: nullableText,
7448
+ created_at: time,
7449
+ updated_at: time,
7450
+ untrusted
7451
+ });
7452
+ var lead = deal;
7453
+ var pipelineStage = strictObject({
7454
+ name: text,
7455
+ position: count,
7456
+ outcome,
7457
+ external_id: nullableText,
7458
+ /** Open deals or leads in it now. */
7459
+ open: count,
7460
+ /** With a funnel: rows that got this far, and the share of them that reached the next stage. */
7461
+ reached: optional(count),
7462
+ conversion: optional(nullable(number()))
7463
+ });
7464
+ var pipeline = strictObject({
7465
+ id,
7466
+ ref: reference,
7467
+ name: text,
7468
+ kind: picklist(["deal", "lead"]),
7469
+ account: crmAccount,
7470
+ external_id: nullableText,
7471
+ stages: array(pipelineStage),
7472
+ created_at: time,
7473
+ totals: optional(strictObject({ items: count, open: count, won: count, lost: count, win_rate: nullable(number()) })),
7474
+ since: optional(day),
7475
+ untrusted
7476
+ });
7477
+ var stage = strictObject({
7478
+ ...pipelineStage.entries,
7479
+ pipeline: reference,
7480
+ pipeline_name: text,
7481
+ kind: picklist(["deal", "lead"]),
7482
+ untrusted
7483
+ });
7484
+
7485
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/document.js
7257
7486
  var document = strictObject({
7258
7487
  ref: reference,
7259
7488
  id,
@@ -7268,7 +7497,7 @@ var document = strictObject({
7268
7497
  owners: optional(array(text))
7269
7498
  });
7270
7499
 
7271
- // 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/entities/document-link.js
7500
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/document-link.js
7272
7501
  var documentLink = strictObject({
7273
7502
  ref: reference,
7274
7503
  url: text,
@@ -7279,7 +7508,7 @@ var documentLink = strictObject({
7279
7508
  sender: strictObject({ id: nullable(id), name: nullable(text) })
7280
7509
  });
7281
7510
 
7282
- // 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/entities/evidence.js
7511
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/evidence.js
7283
7512
  var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
7284
7513
  var contribution = strictObject({
7285
7514
  message: evidenceMessage,
@@ -7309,7 +7538,7 @@ var retentionStay = strictObject({
7309
7538
  });
7310
7539
  var evidence = union([contribution, retentionStay]);
7311
7540
 
7312
- // 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/entities/fact.js
7541
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/fact.js
7313
7542
  var fact = strictObject({
7314
7543
  ref: reference,
7315
7544
  id,
@@ -7339,9 +7568,9 @@ var fact = strictObject({
7339
7568
  updated_at: time
7340
7569
  });
7341
7570
 
7342
- // 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/entities/hit.js
7571
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/hit.js
7343
7572
  var hit = strictObject({
7344
- kind: picklist(["message", "mail", "note", "document", "event", "meeting"]),
7573
+ kind: picklist(["message", "mail", "note", "document", "event", "meeting", "deal", "lead"]),
7345
7574
  ref: reference,
7346
7575
  provider: text,
7347
7576
  url: optional(text),
@@ -7377,7 +7606,7 @@ var hit = strictObject({
7377
7606
  untrusted
7378
7607
  });
7379
7608
 
7380
- // 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/entities/identity.js
7609
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/identity.js
7381
7610
  var identity = strictObject({
7382
7611
  ref: reference,
7383
7612
  provider: text,
@@ -7390,7 +7619,7 @@ var identity = strictObject({
7390
7619
  person: optional(nullable(reference))
7391
7620
  });
7392
7621
 
7393
- // 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/entities/image-embedding.js
7622
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
7394
7623
  var imageEmbedding = strictObject({
7395
7624
  model: text,
7396
7625
  embedded: count,
@@ -7399,13 +7628,13 @@ var imageEmbedding = strictObject({
7399
7628
  more: boolean()
7400
7629
  });
7401
7630
 
7402
- // 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/services/backfill-jobs.js
7631
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
7403
7632
  import { spawn } from "node:child_process";
7404
7633
  import { randomBytes } from "node:crypto";
7405
- import { closeSync, existsSync as existsSync4, mkdirSync as mkdirSync2, openSync, readdirSync as readdirSync2, readFileSync as readFileSync3, realpathSync, rmSync as rmSync2 } from "node:fs";
7406
- import { dirname as dirname2, join as join3 } from "node:path";
7634
+ import { closeSync, existsSync as existsSync5, mkdirSync as mkdirSync2, openSync, readdirSync as readdirSync3, readFileSync as readFileSync4, realpathSync, rmSync as rmSync2 } from "node:fs";
7635
+ import { dirname as dirname2, join as join4 } from "node:path";
7407
7636
 
7408
- // 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/background/checkpoints.js
7637
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/background/checkpoints.js
7409
7638
  var progressOf = /* @__PURE__ */ __name((input) => {
7410
7639
  const total = input.total ?? null;
7411
7640
  const updated = input.updatedAt ?? null;
@@ -7421,7 +7650,7 @@ var progressOf = /* @__PURE__ */ __name((input) => {
7421
7650
  };
7422
7651
  }, "progressOf");
7423
7652
 
7424
- // 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/runs/record-log.js
7653
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/runs/record-log.js
7425
7654
  var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
7426
7655
  const run = currentRun();
7427
7656
  const trace = traceId ?? run.traceId;
@@ -7435,7 +7664,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
7435
7664
  }));
7436
7665
  }, "recordLogFor");
7437
7666
 
7438
- // 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/services/backfill-jobs.js
7667
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
7439
7668
  var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
7440
7669
  var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
7441
7670
  const out = openSync(log, "a", 384);
@@ -7451,23 +7680,23 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
7451
7680
  closeSync(out);
7452
7681
  }
7453
7682
  }, "spawnDetached");
7454
- var jobsDir = /* @__PURE__ */ __name((app, env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
7455
- var jobPath = /* @__PURE__ */ __name((dir, id6) => join3(dir, `${id6}.json`), "jobPath");
7683
+ var jobsDir = /* @__PURE__ */ __name((app, env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
7684
+ var jobPath = /* @__PURE__ */ __name((dir, id6) => join4(dir, `${id6}.json`), "jobPath");
7456
7685
  var saveJob = /* @__PURE__ */ __name((dir, job2) => {
7457
7686
  mkdirSync2(dir, { recursive: true, mode: 448 });
7458
7687
  writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
7459
7688
  `, 384);
7460
7689
  }, "saveJob");
7461
7690
  var readJob = /* @__PURE__ */ __name((dir, id6) => {
7462
- if (!/^[\w-]+$/.test(id6) || !existsSync4(jobPath(dir, id6)))
7691
+ if (!/^[\w-]+$/.test(id6) || !existsSync5(jobPath(dir, id6)))
7463
7692
  return void 0;
7464
7693
  try {
7465
- return JSON.parse(readFileSync3(jobPath(dir, id6), "utf8"));
7694
+ return JSON.parse(readFileSync4(jobPath(dir, id6), "utf8"));
7466
7695
  } catch {
7467
7696
  return void 0;
7468
7697
  }
7469
7698
  }, "readJob");
7470
- var recordsPath = /* @__PURE__ */ __name((dir, id6) => join3(dir, `${id6}.jsonl`), "recordsPath");
7699
+ var recordsPath = /* @__PURE__ */ __name((dir, id6) => join4(dir, `${id6}.jsonl`), "recordsPath");
7471
7700
  var tracedJob = /* @__PURE__ */ __name((env) => {
7472
7701
  const trace = childTrace();
7473
7702
  return { env: { ...env, TRACEPARENT: trace.traceparent }, traceId: trace.traceId };
@@ -7485,11 +7714,11 @@ var finishJob = /* @__PURE__ */ __name((app, dir, id6, change) => {
7485
7714
  const job2 = readJob(dir, id6);
7486
7715
  if (!job2)
7487
7716
  return;
7488
- const outcome3 = stateOf(job2);
7717
+ const outcome4 = stateOf(job2);
7489
7718
  recordLogFor(recordsPath(dir, id6), app, job2.traceId ? { traceId: job2.traceId } : {})[job2.error ? "error" : "info"]({
7490
7719
  event: "job.exit",
7491
7720
  job: id6,
7492
- outcome: outcome3,
7721
+ outcome: outcome4,
7493
7722
  ...job2.error ? { errorCode: job2.error.code } : {}
7494
7723
  });
7495
7724
  }, "finishJob");
@@ -7504,7 +7733,7 @@ var removeJob = /* @__PURE__ */ __name((dir, job2) => {
7504
7733
  if (dirname2(job2.log) === dir)
7505
7734
  rmSync2(job2.log, { force: true });
7506
7735
  }, "removeJob");
7507
- var listJobs = /* @__PURE__ */ __name((dir) => existsSync4(dir) ? readdirSync2(dir).filter((name) => name.endsWith(".json")).flatMap((name) => readJob(dir, name.slice(0, -".json".length)) ?? []).sort((a, b) => b.startedAt.localeCompare(a.startedAt)) : [], "listJobs");
7736
+ var listJobs = /* @__PURE__ */ __name((dir) => existsSync5(dir) ? readdirSync3(dir).filter((name) => name.endsWith(".json")).flatMap((name) => readJob(dir, name.slice(0, -".json".length)) ?? []).sort((a, b) => b.startedAt.localeCompare(a.startedAt)) : [], "listJobs");
7508
7737
  var jobDetails = /* @__PURE__ */ __name((job2) => ({
7509
7738
  job: job2.id,
7510
7739
  profile: job2.profile,
@@ -7570,7 +7799,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
7570
7799
  const startedAt = (/* @__PURE__ */ new Date()).toISOString();
7571
7800
  const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes(3).toString("hex")}`;
7572
7801
  mkdirSync2(dir, { recursive: true, mode: 448 });
7573
- const log = join3(dir, `${id6}.log`);
7802
+ const log = join4(dir, `${id6}.log`);
7574
7803
  const job2 = {
7575
7804
  id: id6,
7576
7805
  chat: input.chat,
@@ -7590,7 +7819,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
7590
7819
  return { job: id6, pid, chat: input.chat, log };
7591
7820
  }, "startArchiveJob");
7592
7821
 
7593
- // 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/entities/job.js
7822
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/job.js
7594
7823
  var problem = strictObject({ code: text, message: text });
7595
7824
  var job = strictObject({
7596
7825
  id,
@@ -7613,7 +7842,7 @@ var job = strictObject({
7613
7842
  error: optional(problem)
7614
7843
  });
7615
7844
 
7616
- // 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/entities/join-request.js
7845
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/join-request.js
7617
7846
  var joinRequest = strictObject({
7618
7847
  person_id: id,
7619
7848
  name: nullable(text),
@@ -7624,7 +7853,7 @@ var joinRequest = strictObject({
7624
7853
  about: optional(text)
7625
7854
  });
7626
7855
 
7627
- // 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/entities/list-results.js
7856
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/list-results.js
7628
7857
  var botProfile = strictObject({
7629
7858
  name: text,
7630
7859
  token: text,
@@ -7655,6 +7884,10 @@ var scheduledJob = strictObject({
7655
7884
  name: text,
7656
7885
  kind: picklist(["command", "agent"]),
7657
7886
  when: text,
7887
+ /** When a finished run shows a desktop notice: `always`, `failures` or `never`; the default is shown, not left out. */
7888
+ notify: optional(picklist(["always", "failures", "never"])),
7889
+ /** Where a run's result is sent after it: `telegram-bot:<profile>/<chat>` or `email:<profile>/<address>`. */
7890
+ deliver_to: optional(array(text)),
7658
7891
  last: nullable(strictObject({
7659
7892
  at: time,
7660
7893
  exit_code: number(),
@@ -7663,8 +7896,29 @@ var scheduledJob = strictObject({
7663
7896
  reason: optional(text),
7664
7897
  error_code: optional(text),
7665
7898
  failing_since: optional(time),
7666
- failures: optional(number())
7667
- }))
7899
+ failures: optional(number()),
7900
+ cost_usd: optional(number()),
7901
+ /** The last time a run did not start, and why: the day's cost cap, or too little new mail. */
7902
+ skipped: optional(strictObject({
7903
+ at: time,
7904
+ why: text,
7905
+ /** A dotted id for `why`, so a client can translate it: `cost.day-cap`, `mail.none-new`, `mail.below-threshold`. */
7906
+ reason: optional(pipe(text, regex(/^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/)))
7907
+ })),
7908
+ /** How the run's result went along each route; `reason` a dotted id, `error` the sending CLI's code and reason id. */
7909
+ deliveries: optional(array(strictObject({
7910
+ to: text,
7911
+ ok: boolean(),
7912
+ reason: optional(pipe(text, regex(/^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/))),
7913
+ error: optional(text)
7914
+ })))
7915
+ })),
7916
+ /** Agent schedules: what today's runs cost, in US dollars. */
7917
+ spent_today_usd: optional(number()),
7918
+ /** Agent schedules: the cap on one run (`--max-cost`), null when none. */
7919
+ max_cost_usd: optional(nullable(number())),
7920
+ /** Agent schedules: the daily cap in force, the schedule's `--max-cost-per-day` or the config's; 0 for none. */
7921
+ max_cost_per_day_usd: optional(number())
7668
7922
  });
7669
7923
  var botTemplate = strictObject({
7670
7924
  name: nullable(text),
@@ -7692,7 +7946,7 @@ var stickerInventory = strictObject({
7692
7946
  url: optional(nullable(text))
7693
7947
  });
7694
7948
 
7695
- // 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/entities/poll-vote.js
7949
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
7696
7950
  var pollVote = strictObject({
7697
7951
  person_id: id,
7698
7952
  name: nullable(text),
@@ -7702,7 +7956,7 @@ var pollVote = strictObject({
7702
7956
  voted_at: time
7703
7957
  });
7704
7958
 
7705
- // 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/entities/listener.js
7959
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/listener.js
7706
7960
  var reactions = unwrap(unwrap(message.entries.reactions));
7707
7961
  var observation = strictObject({
7708
7962
  value: pipe(number(), minValue(0)),
@@ -7744,7 +7998,7 @@ var serveSummary = strictObject({
7744
7998
  tasks: optional(strictObject({ added: count, closed: count, review: count }))
7745
7999
  });
7746
8000
 
7747
- // 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/entities/mail-counts.js
8001
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
7748
8002
  var mailCounts = strictObject({
7749
8003
  by: picklist(["day", "week", "sender"]),
7750
8004
  received: count,
@@ -7759,7 +8013,7 @@ var mailCounts = strictObject({
7759
8013
  }))
7760
8014
  });
7761
8015
 
7762
- // 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/entities/mail-findings.js
8016
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
7763
8017
  var evidence2 = strictObject({ reference, fingerprint: text });
7764
8018
  var base = { id, evidence: array(evidence2) };
7765
8019
  var finding = variant("kind", [
@@ -7774,7 +8028,11 @@ var finding = variant("kind", [
7774
8028
  due_at: optional(time),
7775
8029
  due_evidence: optional(array(reference)),
7776
8030
  assignee: optional(reference),
7777
- assignee_evidence: optional(array(reference))
8031
+ assignee_evidence: optional(array(reference)),
8032
+ /** `<service>:<id>` in the outside service the mail came from, such as `avito:4512345678`. */
8033
+ external_id: optional(text),
8034
+ /** The http or https page the task is about, such as the conversation the mail links to. */
8035
+ source_url: optional(text)
7778
8036
  }),
7779
8037
  strictObject({
7780
8038
  ...base,
@@ -7782,7 +8040,9 @@ var finding = variant("kind", [
7782
8040
  project: optional(reference),
7783
8041
  subject: optional(reference),
7784
8042
  type: picklist(FACT_TYPES),
7785
- statement: text
8043
+ statement: text,
8044
+ /** Every new finding gives one; a batch staged before reason was needed on every kind has none. */
8045
+ reason: optional(text)
7786
8046
  }),
7787
8047
  strictObject({
7788
8048
  ...base,
@@ -7800,12 +8060,84 @@ var finding = variant("kind", [
7800
8060
  scope: picklist(MEMORY_SCOPES),
7801
8061
  body: text,
7802
8062
  subject: optional(reference),
7803
- project: optional(reference)
8063
+ project: optional(reference),
8064
+ reason: optional(text)
7804
8065
  }),
7805
8066
  strictObject({ ...base, kind: literal("link"), from: reference, to: reference, reason: text }),
7806
- strictObject({ ...base, kind: literal("new_contact"), address: text, name: text, reason: optional(text) })
8067
+ strictObject({ ...base, kind: literal("new_contact"), address: text, name: text, reason: optional(text) }),
8068
+ strictObject({
8069
+ ...base,
8070
+ kind: literal("invoice"),
8071
+ direction: picklist(INVOICE_DIRECTIONS),
8072
+ counterparty: optional(reference),
8073
+ /** A counterparty the store may not hold yet; the owner's accept finds its organization or makes one. */
8074
+ counterparty_name: optional(text),
8075
+ counterparty_email: optional(text),
8076
+ currency: text,
8077
+ lines: array(strictObject({
8078
+ description: text,
8079
+ quantity: optional(text),
8080
+ unit_price: optional(text),
8081
+ amount: optional(text)
8082
+ })),
8083
+ total: optional(text),
8084
+ number: optional(text),
8085
+ issue_date: optional(text),
8086
+ due_date: optional(text),
8087
+ project: optional(reference),
8088
+ reason: text
8089
+ }),
8090
+ strictObject({
8091
+ ...base,
8092
+ kind: literal("payment"),
8093
+ direction: picklist(MONEY_DIRECTIONS),
8094
+ payer: optional(reference),
8095
+ payer_name: optional(text),
8096
+ payer_email: optional(text),
8097
+ payee: optional(reference),
8098
+ payee_name: optional(text),
8099
+ payee_email: optional(text),
8100
+ amount: text,
8101
+ currency: text,
8102
+ date: text,
8103
+ reference: optional(text),
8104
+ allocations: optional(array(strictObject({ invoice: reference, amount: text }))),
8105
+ project: optional(reference),
8106
+ reason: text
8107
+ }),
8108
+ strictObject({
8109
+ ...base,
8110
+ kind: literal("order"),
8111
+ purpose: picklist(ORDER_PURPOSES),
8112
+ customer: optional(reference),
8113
+ customer_name: optional(text),
8114
+ customer_email: optional(text),
8115
+ supplier: optional(reference),
8116
+ supplier_name: text,
8117
+ number: optional(text),
8118
+ total: optional(text),
8119
+ currency: optional(text),
8120
+ status: optional(picklist(ORDER_STATUSES)),
8121
+ order_date: optional(text),
8122
+ fulfilled_date: optional(text),
8123
+ invoice: optional(reference),
8124
+ payment: optional(reference),
8125
+ project: optional(reference),
8126
+ /** The order's page at the shop, http or https. */
8127
+ source_url: optional(text),
8128
+ reason: text
8129
+ }),
8130
+ strictObject({
8131
+ ...base,
8132
+ kind: literal("order_update"),
8133
+ supplier_name: text,
8134
+ number: text,
8135
+ status: picklist(ORDER_STATUSES),
8136
+ date: optional(text),
8137
+ reason: text
8138
+ })
7807
8139
  ]);
7808
- var outcome = strictObject({
8140
+ var outcome2 = strictObject({
7809
8141
  id,
7810
8142
  fingerprint: text,
7811
8143
  status: picklist(["accepted", "rejected"]),
@@ -7821,11 +8153,11 @@ var mailFindings = strictObject({
7821
8153
  author,
7822
8154
  decided_by: nullable(strictObject({ type: picklist(["person", "bot"]), id })),
7823
8155
  decided_at: nullable(time),
7824
- previous: array(outcome),
7825
- receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome) }))
8156
+ previous: array(outcome2),
8157
+ receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
7826
8158
  });
7827
8159
 
7828
- // 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/entities/media-archive.js
8160
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
7829
8161
  var mediaArchive = strictObject({
7830
8162
  directory: text,
7831
8163
  chats: count,
@@ -7857,7 +8189,7 @@ var mediaArchiveTimer = union([
7857
8189
  strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
7858
8190
  ]);
7859
8191
 
7860
- // 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/entities/meeting-preparation-parts.js
8192
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
7861
8193
  var preparationId = pipe(string(), minLength(1));
7862
8194
  var preparationCount = pipe(number(), integer(), minValue(0));
7863
8195
  var preparationTime = nullable(isoTime);
@@ -7949,7 +8281,7 @@ var preparationMeeting = strictObject({
7949
8281
  updated_at: isoTime
7950
8282
  });
7951
8283
 
7952
- // 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/entities/meeting-evidence.js
8284
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
7953
8285
  var meetingEvidence = preparationEvidence;
7954
8286
  var meetingPersonContext = strictObject({
7955
8287
  person: strictObject({ uid: string(), name: nullable(string()) }),
@@ -7971,7 +8303,7 @@ var meetingPersonContext = strictObject({
7971
8303
  })
7972
8304
  });
7973
8305
 
7974
- // 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/entities/meeting-findings.js
8306
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
7975
8307
  var evidence3 = strictObject({ reference, fingerprint: text });
7976
8308
  var base2 = { id, project: reference, evidence: array(evidence3) };
7977
8309
  var finding2 = variant("kind", [
@@ -7989,7 +8321,7 @@ var finding2 = variant("kind", [
7989
8321
  assignee_evidence: optional(array(reference))
7990
8322
  })
7991
8323
  ]);
7992
- var outcome2 = strictObject({
8324
+ var outcome3 = strictObject({
7993
8325
  id,
7994
8326
  fingerprint: text,
7995
8327
  status: picklist(["accepted", "rejected"]),
@@ -8005,11 +8337,11 @@ var meetingFindings = strictObject({
8005
8337
  author,
8006
8338
  decided_by: nullable(strictObject({ type: picklist(["person", "bot"]), id })),
8007
8339
  decided_at: nullable(time),
8008
- previous: array(outcome2),
8009
- receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
8340
+ previous: array(outcome3),
8341
+ receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome3) }))
8010
8342
  });
8011
8343
 
8012
- // 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/entities/meeting-communications.js
8344
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
8013
8345
  var communicationCoverage = strictObject({
8014
8346
  read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
8015
8347
  query: string(),
@@ -8054,7 +8386,7 @@ var preparationCommunications = strictObject({
8054
8386
  }))
8055
8387
  });
8056
8388
 
8057
- // 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/entities/meeting-preparation.js
8389
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
8058
8390
  var meetingPreparation = strictObject({
8059
8391
  communications: optional(preparationCommunications),
8060
8392
  schema_version: literal(1),
@@ -8167,7 +8499,7 @@ var meetingPreparation = strictObject({
8167
8499
  })
8168
8500
  });
8169
8501
 
8170
- // 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/entities/meeting-project-candidates.js
8502
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
8171
8503
  var count4 = pipe(number(), integer(), minValue(0));
8172
8504
  var id3 = pipe(string(), minLength(1));
8173
8505
  var text3 = string();
@@ -8231,7 +8563,7 @@ var meetingProjectCandidates = strictObject({
8231
8563
  })
8232
8564
  });
8233
8565
 
8234
- // 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/entities/meeting-series-inventory.js
8566
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
8235
8567
  var count5 = pipe(number(), integer(), minValue(0));
8236
8568
  var id4 = pipe(string(), minLength(1), maxLength(1e3));
8237
8569
  var meetingSeriesInventory = strictObject({
@@ -8261,7 +8593,7 @@ var meetingSeriesInventory = strictObject({
8261
8593
  })
8262
8594
  });
8263
8595
 
8264
- // 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/entities/meeting-task-proposal.js
8596
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
8265
8597
  var text4 = string();
8266
8598
  var id5 = pipe(number(), integer(), minValue(1));
8267
8599
  var revision = picklist(["current", "superseded"]);
@@ -8278,7 +8610,7 @@ var meetingTaskProposal = strictObject({
8278
8610
  persistence: literal("proposal-only")
8279
8611
  });
8280
8612
 
8281
- // 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/entities/memory.js
8613
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/memory.js
8282
8614
  var memory = strictObject({
8283
8615
  ref: reference,
8284
8616
  id,
@@ -8305,7 +8637,7 @@ var memory = strictObject({
8305
8637
  updated_at: time
8306
8638
  });
8307
8639
 
8308
- // 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/entities/mention.js
8640
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/mention.js
8309
8641
  var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
8310
8642
  var status = picklist(["found", "linked", "dismissed"]);
8311
8643
  var mention = strictObject({
@@ -8348,13 +8680,13 @@ var mentionRebuild = strictObject({
8348
8680
  mentions: count
8349
8681
  });
8350
8682
 
8351
- // 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/entities/message-change.js
8683
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/message-change.js
8352
8684
  var operated3 = { operation_id: id, chat_id: id };
8353
8685
  var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
8354
8686
  var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
8355
8687
  var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
8356
8688
 
8357
- // 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/entities/message-read.js
8689
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/message-read.js
8358
8690
  var messageTranscript = strictObject({
8359
8691
  message_id: id,
8360
8692
  text,
@@ -8412,7 +8744,7 @@ var evidencePacket = strictObject({
8412
8744
  }))
8413
8745
  });
8414
8746
 
8415
- // 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/entities/message-context.js
8747
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/message-context.js
8416
8748
  var messageThread = strictObject({
8417
8749
  ref: reference,
8418
8750
  chat: id,
@@ -8429,7 +8761,7 @@ var messageThread = strictObject({
8429
8761
  });
8430
8762
  var messageContext = union([message, messageThread]);
8431
8763
 
8432
- // 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/entities/message-counts.js
8764
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
8433
8765
  var messageCounts = strictObject({
8434
8766
  by: picklist(["chat", "sender", "day", "hour"]),
8435
8767
  total: count,
@@ -8442,7 +8774,7 @@ var messageCounts = strictObject({
8442
8774
  }))
8443
8775
  });
8444
8776
 
8445
- // 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/entities/message-link.js
8777
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/message-link.js
8446
8778
  var messageLink = strictObject({
8447
8779
  ref: reference,
8448
8780
  url: nullable(text),
@@ -8459,7 +8791,7 @@ var messageLink = strictObject({
8459
8791
  })))
8460
8792
  });
8461
8793
 
8462
- // 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/entities/message-transfer.js
8794
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
8463
8795
  var savedMessageFile = strictObject({
8464
8796
  kind: text,
8465
8797
  path: text,
@@ -8546,7 +8878,7 @@ var messageSyncAll = strictObject({
8546
8878
  var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
8547
8879
  var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
8548
8880
 
8549
- // 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/entities/message-write.js
8881
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/message-write.js
8550
8882
  var messageWrite = strictObject({
8551
8883
  operation_id: id,
8552
8884
  message,
@@ -8561,7 +8893,7 @@ var draftWrite = strictObject({
8561
8893
  });
8562
8894
  var messageSend = union([messageWrite, draftWrite]);
8563
8895
 
8564
- // 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/entities/model.js
8896
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/model.js
8565
8897
  var model2 = strictObject({
8566
8898
  id,
8567
8899
  kind: picklist(["audio", "text", "image", "reranker"]),
@@ -8578,7 +8910,7 @@ var model2 = strictObject({
8578
8910
  path: text
8579
8911
  });
8580
8912
 
8581
- // 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/entities/model-key.js
8913
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/model-key.js
8582
8914
  var source = picklist(["environment", "keyring", "file"]);
8583
8915
  var modelKey = strictObject({
8584
8916
  provider: text,
@@ -8588,7 +8920,7 @@ var modelKey = strictObject({
8588
8920
  var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
8589
8921
  var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
8590
8922
 
8591
- // 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/entities/official-stats.js
8923
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
8592
8924
  var versus = strictObject({ current: number(), previous: number() });
8593
8925
  var person = { person_ref: reference, name: nullable(text) };
8594
8926
  var graph = strictObject({
@@ -8622,14 +8954,14 @@ var officialStats = strictObject({
8622
8954
  graphs: record(string(), union([graph, strictObject({ error: text })]))
8623
8955
  });
8624
8956
 
8625
- // 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/entities/person.js
8957
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/person.js
8626
8958
  var person2 = strictObject({
8627
8959
  ref: reference,
8628
8960
  name: nullable(text),
8629
8961
  identities: optional(array(identity))
8630
8962
  });
8631
8963
 
8632
- // 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/entities/poll.js
8964
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/poll.js
8633
8965
  var poll = strictObject({
8634
8966
  chat_id: id,
8635
8967
  message_id: id,
@@ -8645,11 +8977,11 @@ var poll = strictObject({
8645
8977
  });
8646
8978
  var pollChange = strictObject({ operation_id: id, poll });
8647
8979
 
8648
- // 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/entities/private-contact.js
8980
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
8649
8981
  var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
8650
8982
  var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
8651
8983
 
8652
- // 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/entities/ranking.js
8984
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/ranking.js
8653
8985
  var figures = record(string(), number());
8654
8986
  var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
8655
8987
  var rankingRow = strictObject({
@@ -8696,7 +9028,7 @@ var ranking = strictObject({
8696
9028
  rows: array(rankingRow)
8697
9029
  });
8698
9030
 
8699
- // 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/entities/reaction.js
9031
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/reaction.js
8700
9032
  var reaction = strictObject({
8701
9033
  person: strictObject({ id, name: nullable(text), username: nullable(text) }),
8702
9034
  /** The emoji, or `custom:<id>` for a custom one. */
@@ -8704,7 +9036,7 @@ var reaction = strictObject({
8704
9036
  reacted_at: time
8705
9037
  });
8706
9038
 
8707
- // 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/entities/reaction-change.js
9039
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
8708
9040
  var reactionChange = strictObject({
8709
9041
  operation_id: id,
8710
9042
  chat_id: id,
@@ -8712,7 +9044,7 @@ var reactionChange = strictObject({
8712
9044
  reaction: nullable(text)
8713
9045
  });
8714
9046
 
8715
- // 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/entities/recipient.js
9047
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/recipient.js
8716
9048
  var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
8717
9049
  var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
8718
9050
  var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
@@ -8723,7 +9055,7 @@ var recipientChange = strictObject({
8723
9055
  ...partial(recipientOff).entries
8724
9056
  });
8725
9057
 
8726
- // 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/entities/recorded-run.js
9058
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
8727
9059
  var events = array(record(string(), unknown()));
8728
9060
  var recordedRun = strictObject({
8729
9061
  run_id: id,
@@ -8795,7 +9127,7 @@ var runHit = strictObject({
8795
9127
  });
8796
9128
  var runLocation = strictObject({ path: text });
8797
9129
 
8798
- // 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/entities/relationship.js
9130
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/relationship.js
8799
9131
  var relationship = strictObject({
8800
9132
  id,
8801
9133
  from: reference,
@@ -8812,7 +9144,7 @@ var relationship = strictObject({
8812
9144
  created_at: time
8813
9145
  });
8814
9146
 
8815
- // 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/entities/reply-stats.js
9147
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
8816
9148
  var milliseconds2 = nullable(pipe(number(), minValue(0)));
8817
9149
  var figures2 = { replies: count, median_ms: milliseconds2, p90_ms: milliseconds2, mean_ms: milliseconds2 };
8818
9150
  var responseTimes = strictObject({
@@ -8829,7 +9161,7 @@ var waitingChats = strictObject({
8829
9161
  by_kind: strictObject({ private: count, group: count })
8830
9162
  });
8831
9163
 
8832
- // 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/entities/retention.js
9164
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/retention.js
8833
9165
  var retentionCohort = strictObject({
8834
9166
  /** The first day of the joining day or week. */
8835
9167
  cohort: text,
@@ -8877,7 +9209,7 @@ var retention = strictObject({
8877
9209
  rows: array(retentionCohort)
8878
9210
  });
8879
9211
 
8880
- // 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/entities/saved-search.js
9212
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
8881
9213
  var savedSearch = strictObject({
8882
9214
  id,
8883
9215
  /** `null` for a run in the history. */
@@ -8894,7 +9226,7 @@ var savedSearch = strictObject({
8894
9226
  });
8895
9227
  var searchHistoryClear = strictObject({ cleared: count });
8896
9228
 
8897
- // 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/entities/send-attempt.js
9229
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
8898
9230
  var sendAttempt = strictObject({
8899
9231
  at: time,
8900
9232
  profile: text,
@@ -8922,7 +9254,7 @@ var sendAttempt = strictObject({
8922
9254
  error_code: optional(text)
8923
9255
  });
8924
9256
 
8925
- // 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/entities/store-maintenance.js
9257
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
8926
9258
  var absent = strictObject({ path: text, exists: literal(false) });
8927
9259
  var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
8928
9260
  var infoSchema = strictObject({
@@ -9077,12 +9409,25 @@ var storeBackup = strictObject({
9077
9409
  encrypted: optional(literal(true))
9078
9410
  });
9079
9411
  var storeDecrypt = strictObject({ path: text, from: text, bytes: count });
9080
- var storeRestore = strictObject({
9081
- path: text,
9082
- restored_from: text,
9083
- kept_at: nullable(text),
9084
- schema: count
9085
- });
9412
+ var storeRestore = union([
9413
+ strictObject({
9414
+ path: text,
9415
+ restored_from: text,
9416
+ kept_at: nullable(text),
9417
+ schema: count
9418
+ }),
9419
+ /** From a rollback copy: its tables put back in place, the store returned to `schema` from `was`. */
9420
+ strictObject({
9421
+ path: text,
9422
+ restored_from: text,
9423
+ rolled_back: literal(true),
9424
+ schema: count,
9425
+ was: count,
9426
+ tables: array(strictObject({ table: text, rows: count })),
9427
+ rebuilt: array(text),
9428
+ foreign_key_violations: count
9429
+ })
9430
+ ]);
9086
9431
  var storeReset = union([
9087
9432
  strictObject({ ...absent.entries, reset: literal(false) }),
9088
9433
  strictObject({
@@ -9130,7 +9475,7 @@ var storeRepair = union([
9130
9475
  ]);
9131
9476
  var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
9132
9477
 
9133
- // 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/entities/store-records.js
9478
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/store-records.js
9134
9479
  var range = strictObject({ from: number(), to: number() });
9135
9480
  var storeChatStatus = strictObject({
9136
9481
  chat_id: id,
@@ -9228,7 +9573,7 @@ var storeJobRetry = union([
9228
9573
  ]);
9229
9574
  var storeJobClear = strictObject({ cleared: array(id) });
9230
9575
 
9231
- // 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/entities/store-table.js
9576
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/store-table.js
9232
9577
  var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
9233
9578
  var storeTable = strictObject({
9234
9579
  name: text,
@@ -9237,7 +9582,7 @@ var storeTable = strictObject({
9237
9582
  bytes: optional(nullable(count))
9238
9583
  });
9239
9584
 
9240
- // 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/entities/tag-change.js
9585
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
9241
9586
  var tagTarget = variant("type", [
9242
9587
  strictObject({ type: literal("chat"), chat_id: id }),
9243
9588
  strictObject({ type: literal("contact"), person_id: id }),
@@ -9268,7 +9613,7 @@ var automaticTags = strictObject({
9268
9613
  dry_run: boolean()
9269
9614
  });
9270
9615
 
9271
- // 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/entities/task-pair.js
9616
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
9272
9617
  var side = strictObject({ ref: reference, key: text, title: text, status: text });
9273
9618
  var taskPair = strictObject({
9274
9619
  task: nullable(side),
@@ -9291,7 +9636,7 @@ var taskPair = strictObject({
9291
9636
  created_at: time
9292
9637
  });
9293
9638
 
9294
- // 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/entities/task-results.js
9639
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/task-results.js
9295
9640
  var nullableTime = nullable(time);
9296
9641
  var link = strictObject({
9297
9642
  id,
@@ -9326,6 +9671,10 @@ var taskCard = strictObject({
9326
9671
  revision: number(),
9327
9672
  parent: nullable(reference),
9328
9673
  source: nullable(text),
9674
+ /** `<service>:<id>`, its id in an outside service, such as `avito:4512345678`. */
9675
+ external_id: nullable(text),
9676
+ /** The http or https page it is about, such as an Avito ad. */
9677
+ source_url: nullable(text),
9329
9678
  due_at: nullableTime,
9330
9679
  next_check_at: nullableTime,
9331
9680
  closed_at: nullableTime,
@@ -9461,7 +9810,7 @@ var taskReview = strictObject({
9461
9810
  untrusted
9462
9811
  });
9463
9812
 
9464
- // 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/entities/topic.js
9813
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/topic.js
9465
9814
  var topic = strictObject({
9466
9815
  id,
9467
9816
  title: text,
@@ -9475,9 +9824,13 @@ var topic = strictObject({
9475
9824
  untrusted
9476
9825
  });
9477
9826
 
9478
- // 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/entities/index.js
9827
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/index.js
9479
9828
  var ENTITIES = {
9480
9829
  sync_progress: progress,
9830
+ deal,
9831
+ lead,
9832
+ pipeline,
9833
+ stage,
9481
9834
  ...MEETING_RESULT_ENTITIES,
9482
9835
  message,
9483
9836
  message_context: messageContext,
@@ -9757,7 +10110,7 @@ var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.e
9757
10110
  return [name, definition];
9758
10111
  })), "entityDefinitions");
9759
10112
 
9760
- // 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/cli/answer-entity.js
10113
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
9761
10114
  var schemas = /* @__PURE__ */ new WeakMap();
9762
10115
  var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
9763
10116
  if (Object.hasOwn(ENTITIES, name))
@@ -9791,7 +10144,7 @@ var answerRow = /* @__PURE__ */ __name((command) => {
9791
10144
  return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
9792
10145
  }, "answerRow");
9793
10146
 
9794
- // 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/cli/steps.js
10147
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/steps.js
9795
10148
  var STEPS2 = defineSteps([
9796
10149
  ...STEPS,
9797
10150
  {
@@ -10072,29 +10425,20 @@ var stepLine = /* @__PURE__ */ __name((root, step2) => {
10072
10425
  ].join(" ");
10073
10426
  }, "stepLine");
10074
10427
 
10075
- // 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/cli/project-status-rows.js
10076
- var where = [{ field: "ref" }, { field: ["chat_title", "chat"] }];
10428
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
10429
+ var where = [{ field: "ref" }];
10077
10430
  var who2 = { field: ["who.owner", "who.name"], tag: "you" };
10431
+ var ON_CHAT_ROW = /* @__PURE__ */ new Set(["reply-next", "coverage"]);
10078
10432
  var STATUS_SIGNAL_ROWS = {
10079
- "status.last-message": { columns: [...where, { field: "at", as: "time" }, who2] },
10080
- "status.reply-next": {
10081
- columns: [
10082
- ...where,
10083
- { field: "data.next" },
10084
- { field: "data.addressed.name" },
10085
- { field: "data.waiting_since", as: "day" },
10086
- { field: "data.overdue", tag: "overdue" }
10087
- ]
10088
- },
10089
10433
  "status.questions": {
10090
- columns: [...where, { field: "at", as: "day" }, { field: "data.side" }, who2],
10434
+ columns: [...where, { field: "at", as: "day" }, who2],
10091
10435
  text: ["data.excerpt"]
10092
10436
  },
10093
10437
  "status.promises": {
10094
10438
  columns: [
10095
10439
  ...where,
10096
10440
  { field: "at", as: "day" },
10097
- { field: "data.source" },
10441
+ { field: "basis" },
10098
10442
  { field: "data.side" },
10099
10443
  { field: "data.due", as: "day" },
10100
10444
  { field: "data.status" }
@@ -10121,21 +10465,10 @@ var STATUS_SIGNAL_ROWS = {
10121
10465
  columns: [
10122
10466
  ...where,
10123
10467
  { field: "data.query" },
10124
- { field: "data.theirs_last", as: "day" },
10125
10468
  { field: "data.yours_last", as: "day" },
10126
10469
  { field: "data.silent_since", as: "day" }
10127
10470
  ]
10128
10471
  },
10129
- "status.coverage": {
10130
- columns: [
10131
- { field: "chat" },
10132
- { field: "chat_title" },
10133
- { field: "data.state" },
10134
- { field: "data.held.messages", as: "count", tag: "held" },
10135
- { field: "data.held.oldest_at", as: "day" },
10136
- { field: "sync_command" }
10137
- ]
10138
- },
10139
10472
  "status.children": {
10140
10473
  columns: [
10141
10474
  { field: "data.child" },
@@ -10152,10 +10485,14 @@ var STATUS_ROWS = {
10152
10485
  columns: [
10153
10486
  { field: "chat" },
10154
10487
  { field: "title" },
10155
- { field: "kind" },
10156
10488
  { field: "role" },
10157
- { field: "attention", as: "count", tag: "attention" },
10158
- { field: "why" }
10489
+ { field: "next", prefix: "next" },
10490
+ { field: "addressed.name" },
10491
+ { field: "waiting_since", as: "day" },
10492
+ { field: "overdue", tag: "overdue" },
10493
+ { field: "held.messages", as: "count", tag: "held" },
10494
+ { field: "unlisted.questions", as: "count", tag: "questions unlisted" },
10495
+ { field: "unlisted.promises", as: "count", tag: "promises unlisted" }
10159
10496
  ]
10160
10497
  },
10161
10498
  "status.money": {
@@ -10166,7 +10503,6 @@ var STATUS_ROWS = {
10166
10503
  { field: "rows", as: "count", tag: "rows" }
10167
10504
  ]
10168
10505
  },
10169
- "status.signal": { columns: [{ field: "id" }, { field: "version" }] },
10170
10506
  "status.out-of-scope": {
10171
10507
  columns: [
10172
10508
  { field: "chat" },
@@ -10181,7 +10517,7 @@ var STATUS_ROWS = {
10181
10517
  "status.failed": { columns: [{ field: "signal" }], text: ["why"] }
10182
10518
  };
10183
10519
 
10184
- // 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/cli/compact.js
10520
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/compact.js
10185
10521
  var TEXT_CHARS = 400;
10186
10522
  var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
10187
10523
  var messageRow = {
@@ -10366,8 +10702,8 @@ var cellOf = /* @__PURE__ */ __name((item, column, clock) => {
10366
10702
  const parts = clock.parts(iso);
10367
10703
  if (!parts)
10368
10704
  return { text: clean(iso) };
10369
- const day = parts.date.slice(5);
10370
- return { text: column.as === "day" ? day : `${day} ${parts.time}`, date: parts.date };
10705
+ const day2 = parts.date.slice(5);
10706
+ return column.as === "day" ? { text: day2, date: parts.date } : { text: `${day2} ${parts.time}`, date: parts.date, time: parts.time };
10371
10707
  }
10372
10708
  case "count":
10373
10709
  return typeof value === "number" && value !== 0 ? { text: column.tag ? `${value} ${column.tag}` : String(value) } : void 0;
@@ -10415,6 +10751,17 @@ var sameEverywhere = /* @__PURE__ */ __name((rows2, index) => {
10415
10751
  const first2 = rows2[0]?.cells[index]?.text;
10416
10752
  return first2 !== void 0 && rows2.every(({ cells }) => cells[index]?.text === first2);
10417
10753
  }, "sameEverywhere");
10754
+ var ordered = /* @__PURE__ */ __name((dates) => dates.every((one, at2) => at2 === 0 || one >= dates[at2 - 1]) || dates.every((one, at2) => at2 === 0 || one <= dates[at2 - 1]), "ordered");
10755
+ var dayColumn = /* @__PURE__ */ __name((rows2, shape, hoisted) => {
10756
+ const index = shape.columns.findIndex((column, at2) => column.as === "time" && !hoisted[at2]);
10757
+ if (index < 0)
10758
+ return -1;
10759
+ const dates = rows2.map(({ cells }) => cells[index]?.date);
10760
+ if (dates.some((one) => one === void 0))
10761
+ return -1;
10762
+ const days = dates;
10763
+ return ordered(days) && new Set(days).size * 3 <= days.length ? index : -1;
10764
+ }, "dayColumn");
10418
10765
  var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
10419
10766
  const dates = [];
10420
10767
  const rows2 = items.map((item) => {
@@ -10437,18 +10784,31 @@ var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
10437
10784
  return [];
10438
10785
  return [`${sourceOf(item, column) ?? fieldsOfColumn(column.field)[0]}: ${rows2[0]?.cells[index]?.text}`];
10439
10786
  });
10440
- const lines = rows2.map(({ cells, text: text5, item }) => {
10441
- const parts = cells.map((cell, index) => hoisted[index] ? void 0 : cell?.text);
10787
+ const byDay = dayColumn(rows2, shape, hoisted);
10788
+ let shownDay;
10789
+ const lines = rows2.flatMap(({ cells, text: text5, item }) => {
10790
+ const parts = cells.map((cell2, index) => hoisted[index] ? void 0 : cell2?.text);
10791
+ const dayLine = [];
10792
+ const cell = cells[byDay];
10793
+ if (byDay >= 0 && cell?.date && cell.time) {
10794
+ if (cell.date !== shownDay)
10795
+ dayLine.push(`# ${cell.date}`);
10796
+ shownDay = cell.date;
10797
+ parts[byDay] = cell.time;
10798
+ }
10442
10799
  const shortened = prefix ? clean(prefix) : void 0;
10443
10800
  if (shortened && parts[0]?.startsWith(shortened))
10444
10801
  parts[0] = `#${parts[0].slice(shortened.length)}`;
10445
10802
  const shown = [...parts, text5].filter((part) => part !== void 0 && part !== "");
10446
- return guarded(shown.length ? shown.join(" \xB7 ") : item ? blockLine(item, chars) : "");
10803
+ return [...dayLine, guarded(shown.length ? shown.join(" \xB7 ") : item ? blockLine(item, chars) : "")];
10447
10804
  });
10448
- const when = span(dates);
10449
- const header = [...prefix ? [`ref: ${clean(prefix)}<id>`] : [], ...named3, ...when ? [when, clock.zone] : []];
10450
- return { header, lines };
10805
+ const header = [...prefix ? [`ref: ${clean(prefix)}<id>`] : [], ...named3];
10806
+ return { header, lines, dates };
10451
10807
  }, "rowsOfItems");
10808
+ var spanOf = /* @__PURE__ */ __name((dates, clock) => {
10809
+ const when = span(dates);
10810
+ return when ? [when, clock.zone] : [];
10811
+ }, "spanOf");
10452
10812
  var blockLine = /* @__PURE__ */ __name((fields, chars) => blockOf(fields, chars).join(" "), "blockLine");
10453
10813
  var blockOf = /* @__PURE__ */ __name((fields, chars, indent = "", whole = []) => Object.entries(fields).filter(([name]) => !(name === "priority" && "priority_label" in fields)).filter(([, value]) => present(value) || value === false).flatMap(([name, value]) => {
10454
10814
  const label = `${indent}${clean(name)}:`;
@@ -10499,25 +10859,31 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
10499
10859
  const chars = options.textChars ?? TEXT_CHARS;
10500
10860
  let lines = [];
10501
10861
  if ("items" in body) {
10502
- const { header, lines: rows2 } = rowsOfItems(body.items, shape, clock, chars);
10503
- lines = (header.length ? [`# ${header.join(" \xB7 ")}`] : []).concat(rows2.length ? rows2 : ["# nothing found"]);
10862
+ const { header, lines: rows2, dates } = rowsOfItems(body.items, shape, clock, chars);
10863
+ const head = [...header, ...spanOf(dates, clock)];
10864
+ lines = (head.length ? [`# ${head.join(" \xB7 ")}`] : []).concat(rows2.length ? rows2 : ["# nothing found"]);
10504
10865
  } else if (isFields(body.item)) {
10505
10866
  const sections = shape.sections ?? {};
10506
- const rest = Object.fromEntries(Object.entries(body.item).filter(([name]) => !Object.hasOwn(sections, name)));
10867
+ const rest = Object.fromEntries(Object.entries(body.item).filter(([name]) => !Object.hasOwn(sections, name) && !shape.hidden?.includes(name)));
10507
10868
  lines = blockOf(rest, chars, "", shape.whole).map(guarded);
10869
+ let dates = [];
10870
+ let drawn = [];
10508
10871
  for (const [name, entity] of Object.entries(sections)) {
10509
10872
  const list = body.item[name];
10510
10873
  if (!Array.isArray(list))
10511
10874
  continue;
10512
- const { header, lines: rows2 } = rowsOfItems(list, rowsOf(entity), clock, chars);
10513
- lines = lines.concat([`# ${[`${clean(name)}: ${list.length}`, ...header].join(" \xB7 ")}`], rows2);
10875
+ const { header, lines: rows2, dates: more } = rowsOfItems(list, rowsOf(entity), clock, chars);
10876
+ dates = dates.concat(more);
10877
+ drawn = drawn.concat([`# ${[`${clean(name)}: ${list.length}`, ...header].join(" \xB7 ")}`], rows2);
10514
10878
  }
10879
+ const when = spanOf(dates, clock);
10880
+ lines = lines.concat(when.length ? [`# ${when.join(" \xB7 ")}`] : [], drawn);
10515
10881
  } else if (present(body.item))
10516
10882
  lines = [guarded(cut(clean(String(body.item)), chars))];
10517
10883
  return lines.concat(footerOf(body)).join("\n");
10518
10884
  }, "compactText");
10519
10885
 
10520
- // 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/cli/output-budget.js
10886
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
10521
10887
  var SOFT_OUTPUT_BYTES = 256 * 1024;
10522
10888
  var CARRIED = ["json", "compact", "offline", "timeout", "full", "brief", "maxOutputBytes"];
10523
10889
  var NOT_WITH_COMPACT = /* @__PURE__ */ new Set(["json", "brief"]);
@@ -10575,7 +10941,7 @@ var largeAnswerSteps = /* @__PURE__ */ __name((command) => {
10575
10941
  return args ? compactStep(command, args, "the answer is large as JSON; one line per item keeps every ref") : [];
10576
10942
  }, "largeAnswerSteps");
10577
10943
 
10578
- // 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/cli/provider-refs.js
10944
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
10579
10945
  var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
10580
10946
  var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
10581
10947
  var strip = /* @__PURE__ */ __name((value) => {
@@ -10589,7 +10955,7 @@ var strip = /* @__PURE__ */ __name((value) => {
10589
10955
  return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
10590
10956
  }, "strip");
10591
10957
 
10592
- // 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/cli/envelope.js
10958
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/envelope.js
10593
10959
  var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
10594
10960
  var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
10595
10961
  var listOf = /* @__PURE__ */ __name((command, input) => {
@@ -10788,6 +11154,9 @@ export {
10788
11154
  modelTarget,
10789
11155
  AI_ENTRIES,
10790
11156
  resolveAISettings,
11157
+ botFiles,
11158
+ ChatRegistry,
11159
+ registryProfiles,
10791
11160
  REPAIR_WORDS,
10792
11161
  repairConfigText,
10793
11162
  permissionIssues,
@@ -10807,9 +11176,11 @@ export {
10807
11176
  setExitCode,
10808
11177
  provide,
10809
11178
  environmentOf,
11179
+ withAgentLevels,
10810
11180
  secretInputOf,
10811
11181
  outputFor,
10812
11182
  baseContext,
11183
+ inCommandRun,
10813
11184
  REMOTE_READ,
10814
11185
  FETCH,
10815
11186
  REMOTE_WRITE,
@@ -10822,7 +11193,9 @@ export {
10822
11193
  changesAuthorityNow,
10823
11194
  isLogin,
10824
11195
  destroysNothing,
11196
+ admittedUnderLock,
10825
11197
  changesStore,
11198
+ writesNewFileOnlyWith,
10826
11199
  readsOverMcpAt,
10827
11200
  isStoreChange,
10828
11201
  previewFlag,
@@ -10890,6 +11263,7 @@ export {
10890
11263
  answerEntity,
10891
11264
  answerEntitySchema,
10892
11265
  answerProjectionSchema,
11266
+ ON_CHAT_ROW,
10893
11267
  STATUS_SIGNAL_ROWS,
10894
11268
  entityRows,
10895
11269
  nextStep,