@wirecat/tg-cli 0.100.0 → 0.102.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 (117) hide show
  1. package/README.md +3 -3
  2. package/dist/bin/tg.js +1 -1
  3. package/dist/bot/transport.d.ts.map +1 -1
  4. package/dist/bot/transport.js +14 -17
  5. package/dist/bot/transport.js.map +1 -1
  6. package/dist/bundle/{adapter-2LVPMFKF.js → adapter-M2HRSFFL.js} +95 -33
  7. package/dist/bundle/{all-profiles-BLTK2AAB.js → all-profiles-GOD2QNTK.js} +42 -12
  8. package/dist/bundle/{anthropic-RJE4XEOO.js → anthropic-LKU7RWMA.js} +5 -5
  9. package/dist/bundle/{bot-api-4XM3NVWG.js → bot-api-X3MPFVPL.js} +49 -53
  10. package/dist/bundle/{bot-history-WVM5GEQN.js → bot-history-OUMVVG22.js} +15 -15
  11. package/dist/bundle/{bun-UZXO2LRQ.js → bun-LIZ6MKFS.js} +2 -2
  12. package/dist/bundle/{bun-sqlite-GJLGSQIT.js → bun-sqlite-2IFQYQ44.js} +4 -4
  13. package/dist/bundle/chunk-264DAFJV.js +161 -0
  14. package/dist/bundle/{chunk-ASDZHG5I.js → chunk-2SUTCDGO.js} +2 -2
  15. package/dist/bundle/{chunk-2IM4M7Q2.js → chunk-2XBSVRT2.js} +1 -1
  16. package/dist/bundle/{chunk-Q26JMPBP.js → chunk-334UBWOB.js} +11 -11
  17. package/dist/bundle/{chunk-MQNFEVAH.js → chunk-4PDEQL6T.js} +2 -2
  18. package/dist/bundle/chunk-4QB4WDLT.js +922 -0
  19. package/dist/bundle/{chunk-66E5QDLH.js → chunk-5D6OJREA.js} +1 -1
  20. package/dist/bundle/{chunk-RDQMV6EU.js → chunk-5DFGJPT6.js} +4 -4
  21. package/dist/bundle/{chunk-GTURDJJD.js → chunk-5KU4UQBM.js} +1 -1
  22. package/dist/bundle/{chunk-JSKT5UZX.js → chunk-5VSR5ENL.js} +8 -8
  23. package/dist/bundle/{chunk-DN4QUTWU.js → chunk-AUOXTGTU.js} +1 -1
  24. package/dist/bundle/{chunk-X4Y2ROJI.js → chunk-BBC546ZA.js} +91 -2
  25. package/dist/bundle/{chunk-RER6DAHP.js → chunk-BQYTIYGB.js} +171 -148
  26. package/dist/bundle/{chunk-3S5CL55R.js → chunk-CLWYQNSC.js} +6 -6
  27. package/dist/bundle/{chunk-I6WZJVRT.js → chunk-CRZPQQHE.js} +59 -46
  28. package/dist/bundle/chunk-DE7LFMY2.js +440 -0
  29. package/dist/bundle/{chunk-GYEOQS2D.js → chunk-DG62L57H.js} +17 -17
  30. package/dist/bundle/{chunk-QU2FJMFB.js → chunk-ENE5CSVY.js} +2903 -1490
  31. package/dist/bundle/{chunk-P26LWFNZ.js → chunk-ERQDBK5I.js} +1 -1
  32. package/dist/bundle/{chunk-UD4DOZCN.js → chunk-F2TG3BA2.js} +6 -6
  33. package/dist/bundle/{chunk-4U7QOFDA.js → chunk-FBWOQMPE.js} +1698 -816
  34. package/dist/bundle/{chunk-JFJVS5JC.js → chunk-FOUE7XLK.js} +2 -2
  35. package/dist/bundle/{chunk-3QDPV34J.js → chunk-GSKFAE3I.js} +1297 -518
  36. package/dist/bundle/{chunk-BAIZAZ6Q.js → chunk-HLAZ65AW.js} +2 -2
  37. package/dist/bundle/{chunk-LI7TXFLS.js → chunk-JFSVXMN6.js} +3 -3
  38. package/dist/bundle/{chunk-6VEOR6GD.js → chunk-M5UH5CF3.js} +6 -8
  39. package/dist/bundle/{chunk-HXTTDIL7.js → chunk-MGG7JSNO.js} +3 -3
  40. package/dist/bundle/{chunk-6YLT4YVJ.js → chunk-OCWARAFE.js} +2 -2
  41. package/dist/bundle/{chunk-WE3LBRMB.js → chunk-OEJ5DMCX.js} +7 -7
  42. package/dist/bundle/{chunk-SGJYU3SB.js → chunk-OHBHHBYL.js} +3 -3
  43. package/dist/bundle/{chunk-2MXQ2EUN.js → chunk-PSH7K6TL.js} +617 -57
  44. package/dist/bundle/{chunk-H3X5LS6U.js → chunk-PYTOIDSM.js} +4 -4
  45. package/dist/bundle/{chunk-ATZ44Z77.js → chunk-Q2NYEX4A.js} +150 -52
  46. package/dist/bundle/{chunk-KE6L2UEG.js → chunk-QEPZUFPL.js} +70 -61
  47. package/dist/bundle/{chunk-CV5ASHTW.js → chunk-QL7CQ6VZ.js} +255 -80
  48. package/dist/bundle/{chunk-THVNP6S6.js → chunk-SRU3OF4R.js} +2 -2
  49. package/dist/bundle/{chunk-OOOV3JBZ.js → chunk-TV5DGHBT.js} +953 -677
  50. package/dist/bundle/{chunk-A7OBVRJV.js → chunk-TXBUDJ3P.js} +3 -3
  51. package/dist/bundle/{chunk-OW3COBN5.js → chunk-U4RRZUNP.js} +9 -9
  52. package/dist/bundle/{chunk-WKOY3POD.js → chunk-UK3GAN7Q.js} +7 -7
  53. package/dist/bundle/{chunk-BL36RR34.js → chunk-UR6ASUSG.js} +10 -7
  54. package/dist/bundle/{chunk-4VBDVZNE.js → chunk-V52SBQYF.js} +242 -19
  55. package/dist/bundle/{chunk-4YCLWWZ3.js → chunk-VUJ34PEQ.js} +11 -11
  56. package/dist/bundle/{chunk-2XUGPE5W.js → chunk-W5EB4JLV.js} +3 -3
  57. package/dist/bundle/{chunk-3KHKYYCR.js → chunk-WMOEOVWZ.js} +1 -0
  58. package/dist/bundle/{chunk-UMLPXNJI.js → chunk-WVEHUKCZ.js} +1 -1
  59. package/dist/bundle/{chunk-SYPL4PHV.js → chunk-XXTJUZMB.js} +1 -1
  60. package/dist/bundle/{chunk-SMJTL5U7.js → chunk-Y4XSWI22.js} +6 -4
  61. package/dist/bundle/{chunk-HKT5EOT5.js → chunk-YHB57PFN.js} +1 -1
  62. package/dist/bundle/{chunk-BZANDKWT.js → chunk-ZJVZXJOG.js} +2 -2
  63. package/dist/bundle/{chunk-QY3YOOTP.js → chunk-ZRNRQFTF.js} +2 -2
  64. package/dist/bundle/command-contract-A6VZN3ZR.js +31 -0
  65. package/dist/bundle/{echarts-YHSYUWLY.js → echarts-27W2CIBD.js} +2 -2
  66. package/dist/bundle/{embed-3HGI2XIW.js → embed-FGJ273X2.js} +4 -4
  67. package/dist/bundle/{embedder-2CJMZETJ.js → embedder-7ELL3CQ3.js} +7 -7
  68. package/dist/bundle/{entry-UVE53OV3.js → entry-SEE5YWIX.js} +5 -5
  69. package/dist/bundle/{first-run-6GYC2QS3.js → first-run-BD7FEC3W.js} +9 -9
  70. package/dist/bundle/first-screen-ASZV6LSA.js +29 -0
  71. package/dist/bundle/{identity-HEV5E57G.js → identity-QR4F42T6.js} +3 -3
  72. package/dist/bundle/{instructions-5UVAXSQV.js → instructions-L74K64PV.js} +1 -1
  73. package/dist/bundle/{mcp-NWXBVNUA.js → mcp-4Y37G2UY.js} +2 -2
  74. package/dist/bundle/{node-YHYEGYVE.js → node-RSL3HANO.js} +2 -2
  75. package/dist/bundle/{node-sqlite-CQ33A3R2.js → node-sqlite-7R3PYQGJ.js} +4 -4
  76. package/dist/bundle/{oauth-OB3JFAD7.js → oauth-4ESGXF6U.js} +7 -7
  77. package/dist/bundle/{open-JHGZIXU2.js → open-DFYEUGTA.js} +3 -3
  78. package/dist/bundle/{process-PSKS3N5B.js → process-RMV3AKLB.js} +1 -1
  79. package/dist/bundle/{program-RPYVPNRX.js → program-PIUYQHBF.js} +62 -67
  80. package/dist/bundle/{prompt-7BXUMJGG.js → prompt-H7GYQQLL.js} +4 -4
  81. package/dist/bundle/{proxy-transport-3EEMW2HW.js → proxy-transport-G4MA6BGU.js} +4 -4
  82. package/dist/bundle/{recognize-YMZPL47R.js → recognize-3GMOLZF4.js} +5 -5
  83. package/dist/bundle/{remote-LQ3Q22NG.js → remote-IRWTCI2B.js} +5 -5
  84. package/dist/bundle/{rerank-SM7IYVXJ.js → rerank-W3OSXXBN.js} +5 -5
  85. package/dist/bundle/{serve-GHUEP5H5.js → serve-ZCPO44NO.js} +24 -9
  86. package/dist/bundle/{server-A45HVXQY.js → server-FXU4QFRB.js} +42 -39
  87. package/dist/bundle/{server-K2BQPPHN.js → server-YWL4HDOP.js} +77 -68
  88. package/dist/bundle/{state-WIOL52GZ.js → state-MJPTDIB5.js} +9 -5
  89. package/dist/bundle/{store-XE5AKUJZ.js → store-6VNQG56O.js} +10 -10
  90. package/dist/bundle/store-maintenance-command-62TQTMER.js +43 -0
  91. package/dist/bundle/tg.js +4 -4
  92. package/dist/commands/context.d.ts.map +1 -1
  93. package/dist/commands/context.js +2 -0
  94. package/dist/commands/context.js.map +1 -1
  95. package/dist/program.js +1 -1
  96. package/dist/program.js.map +1 -1
  97. package/dist/telegram/errors.js +1 -1
  98. package/dist/telegram/errors.js.map +1 -1
  99. package/dist/telegram/sending.d.ts.map +1 -1
  100. package/dist/telegram/sending.js +52 -3
  101. package/dist/telegram/sending.js.map +1 -1
  102. package/dist/version.d.ts +1 -1
  103. package/dist/version.js +1 -1
  104. package/install/windows.ps1 +1 -1
  105. package/package.json +3 -3
  106. package/skills/tg-cli/SKILL.md +4 -4
  107. package/dist/bundle/chunk-3N6LXAPE.js +0 -724
  108. package/dist/bundle/chunk-DVOUKGFK.js +0 -1950
  109. package/dist/bundle/chunk-MUEXF4ME.js +0 -582
  110. package/dist/bundle/chunk-U7LXA4SO.js +0 -1007
  111. package/dist/bundle/chunk-V4JSVH4M.js +0 -190
  112. package/dist/bundle/chunk-YG7PNCSW.js +0 -230
  113. package/dist/bundle/chunk-Z2FHEIXN.js +0 -63
  114. package/dist/bundle/command-contract-AIVKJYIR.js +0 -31
  115. package/dist/bundle/first-screen-HRRLVLOG.js +0 -29
  116. package/dist/bundle/store-maintenance-command-YS5E7VUN.js +0 -46
  117. /package/dist/bundle/{chunk-3MVHRZWR.js → chunk-2SJOUK6J.js} +0 -0
@@ -4,23 +4,23 @@ import {
4
4
  executableEnvironment,
5
5
  executableOnPath,
6
6
  require_cross_spawn
7
- } from "./chunk-GTURDJJD.js";
7
+ } from "./chunk-5KU4UQBM.js";
8
8
  import {
9
9
  loadConfigFile,
10
10
  saveConfigFile
11
- } from "./chunk-GYEOQS2D.js";
11
+ } from "./chunk-DG62L57H.js";
12
12
  import {
13
13
  number,
14
14
  object,
15
15
  optional,
16
16
  string
17
- } from "./chunk-WE3LBRMB.js";
17
+ } from "./chunk-OEJ5DMCX.js";
18
18
  import {
19
19
  __name,
20
20
  __toESM
21
21
  } from "./chunk-AFV74GK3.js";
22
22
 
23
- // node_modules/.pnpm/@wirecat+cli-base@0.63.0_commander@15.0.0_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
23
+ // node_modules/.pnpm/@wirecat+cli-base@0.64.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
24
24
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
25
25
  import { existsSync } from "node:fs";
26
26
  var installerOf = /* @__PURE__ */ __name((scriptPath) => {
@@ -5,54 +5,57 @@ import {
5
5
  UNTRUSTED_NEUTRAL,
6
6
  agentArguments,
7
7
  agentJson,
8
- commandAvailability
9
- } from "./chunk-4VBDVZNE.js";
10
- import {
8
+ commandAvailability,
11
9
  failureContext
12
- } from "./chunk-YG7PNCSW.js";
10
+ } from "./chunk-V52SBQYF.js";
11
+ import {
12
+ callerOf
13
+ } from "./chunk-BBC546ZA.js";
13
14
  import {
14
15
  lentConnection,
15
16
  onlineDeps,
16
17
  refuseLacking,
17
18
  servicesFor,
18
19
  storeModeDeps
19
- } from "./chunk-4U7QOFDA.js";
20
+ } from "./chunk-FBWOQMPE.js";
20
21
  import {
21
22
  ENTITIES
22
- } from "./chunk-RER6DAHP.js";
23
+ } from "./chunk-BQYTIYGB.js";
23
24
  import {
24
25
  DEFAULT_OUTPUT_BYTES,
25
26
  LOCAL_WRITE,
26
27
  REMOTE_WRITE,
27
28
  answerSchema,
29
+ authorityAllowed,
30
+ botApiAllowed,
28
31
  changesMessenger,
29
32
  flatten,
33
+ inRun,
30
34
  judgedAnswer,
31
35
  judgedEffects,
36
+ keyForCommand,
37
+ levelFor,
32
38
  listOf,
33
- partialOutcome,
39
+ newRunId,
40
+ readKeysForCommand,
34
41
  refuseStoreChange,
35
- runContextOf,
36
42
  sealed,
37
43
  startRecording
38
- } from "./chunk-3QDPV34J.js";
44
+ } from "./chunk-GSKFAE3I.js";
39
45
  import {
40
- authorityAllowed,
41
- botApiAllowed,
42
- inRun,
43
- keyForCommand,
44
- levelFor,
45
- newRunId,
46
- readKeysForCommand
47
- } from "./chunk-U7LXA4SO.js";
46
+ currentCaller,
47
+ keepsSuccess,
48
+ runContextOf,
49
+ withCaller
50
+ } from "./chunk-DE7LFMY2.js";
48
51
  import {
49
52
  MAX_BUFFERED_INPUT
50
- } from "./chunk-BAIZAZ6Q.js";
53
+ } from "./chunk-HLAZ65AW.js";
51
54
  import {
52
55
  captureStreams,
53
56
  errorObjectOf,
54
57
  mcpErrorResult
55
- } from "./chunk-GYEOQS2D.js";
58
+ } from "./chunk-DG62L57H.js";
56
59
  import {
57
60
  CliError,
58
61
  SNAKE_CASE,
@@ -91,15 +94,15 @@ import {
91
94
  unknown,
92
95
  word,
93
96
  writes
94
- } from "./chunk-WE3LBRMB.js";
97
+ } from "./chunk-OEJ5DMCX.js";
95
98
  import {
96
99
  __name
97
100
  } from "./chunk-AFV74GK3.js";
98
101
 
99
- // node_modules/.pnpm/@wirecat+cli-core@0.452.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.63.0_commander@15._e609b9d6c8060966368a91e843fe8bd2/node_modules/@wirecat/cli-core/dist/mcp/agent.js
102
+ // node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/agent.js
100
103
  import { Readable } from "node:stream";
101
104
 
102
- // node_modules/.pnpm/@wirecat+cli-base@0.63.0_commander@15.0.0_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
105
+ // node_modules/.pnpm/@wirecat+cli-base@0.64.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
103
106
  var LINT_SEVERITIES = ["high", "medium", "low"];
104
107
  var lintRuleSchema = strictObject({
105
108
  id: word,
@@ -226,7 +229,7 @@ var overridesSchema = array(strictObject({
226
229
  review_after: pipe(string(), isoDate("a date, YYYY-MM-DD"))
227
230
  }));
228
231
 
229
- // node_modules/.pnpm/@wirecat+cli-base@0.63.0_commander@15.0.0_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/audit.js
232
+ // node_modules/.pnpm/@wirecat+cli-base@0.64.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/audit.js
230
233
  var auditRuleSchema = strictObject({ id: word, severity: picklist(LINT_SEVERITIES), summary: text });
231
234
  var defineAuditRules = /* @__PURE__ */ __name((input) => parseRegistry("audit rules", array(auditRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineAuditRules");
232
235
  var AUDIT_RULES = defineAuditRules([
@@ -284,7 +287,7 @@ var PARITY_GROUPS = defineParityGroups([
284
287
  { name: "messengers", members: ["tg", "max"], covers: "tree", differences: [] },
285
288
  {
286
289
  name: "all",
287
- members: ["tg", "max", "memo", "drive", "zm", "wa"],
290
+ members: ["tg", "max", "memo", "drive", "zm", "wa", "gcal"],
288
291
  covers: ["commands", "doctor", "skill", "mcp", "upgrade", "search", "notes", "meetings"],
289
292
  differences: []
290
293
  }
@@ -300,7 +303,7 @@ var REQUIRED_ROOTS = defineRequiredRoots([
300
303
  { path: ["upgrade"], meaning: "updates the CLI" }
301
304
  ]);
302
305
 
303
- // node_modules/.pnpm/@wirecat+cli-base@0.63.0_commander@15.0.0_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/fields.js
306
+ // node_modules/.pnpm/@wirecat+cli-base@0.64.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/fields.js
304
307
  var fieldRuleSchema = strictObject({ id: word, rule: text });
305
308
  var defineFieldRules = /* @__PURE__ */ __name((input) => parseRegistry("output field rules", array(fieldRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineFieldRules");
306
309
  var FIELD_RULES = defineFieldRules([
@@ -316,7 +319,7 @@ var FIELD_RULES = defineFieldRules([
316
319
  }
317
320
  ]);
318
321
 
319
- // node_modules/.pnpm/@wirecat+cli-base@0.63.0_commander@15.0.0_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/identifiers.js
322
+ // node_modules/.pnpm/@wirecat+cli-base@0.64.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/identifiers.js
320
323
  var key = pipe(string(), regex(SNAKE_CASE, "a snake_case key"));
321
324
  var identifierSchema = strictObject({ key, meaning: text, replaces: optional(array(key)) });
322
325
  var defineIdentifiers = /* @__PURE__ */ __name((input) => parseRegistry("identifiers", array(identifierSchema), input, (identifiers) => {
@@ -338,7 +341,68 @@ var IDENTIFIERS = defineIdentifiers([
338
341
  { key: "trace_id", meaning: "the distributed trace a run belongs to, from `traceparent`" }
339
342
  ]);
340
343
 
341
- // node_modules/.pnpm/@wirecat+cli-base@0.63.0_commander@15.0.0_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-how.js
344
+ // node_modules/.pnpm/@wirecat+cli-base@0.64.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-calendar.js
345
+ var CALENDAR_FLAGS = [
346
+ { name: "--end-time", value: "<time>", role: "value", type: "time", meaning: "when it ends" },
347
+ {
348
+ name: "--start-date",
349
+ value: "<date>",
350
+ role: "value",
351
+ type: "time",
352
+ meaning: "the first day of something that lasts whole days, such as an all-day event"
353
+ },
354
+ {
355
+ name: "--end-date",
356
+ value: "<date>",
357
+ role: "value",
358
+ type: "time",
359
+ meaning: "the last day of something that lasts whole days, such as an all-day event"
360
+ },
361
+ { name: "--location", value: "<text>", role: "value", type: "string", meaning: "where it takes place" },
362
+ {
363
+ name: "--attendee",
364
+ value: "<email>",
365
+ role: "value",
366
+ type: "string",
367
+ meaning: "a person invited to the event, by email address; repeat it for more"
368
+ },
369
+ {
370
+ name: "--id",
371
+ value: "<id>",
372
+ role: "value",
373
+ type: "id",
374
+ meaning: "the id to create it with, chosen beforehand, so a retry finds it instead of making a second one"
375
+ },
376
+ {
377
+ name: "--calendar",
378
+ value: "<id>",
379
+ role: "target",
380
+ type: "id",
381
+ meaning: "the calendar it acts on, when the thing is on more than one"
382
+ },
383
+ {
384
+ name: "--repeat",
385
+ value: "<rule>",
386
+ role: "value",
387
+ type: "string",
388
+ meaning: "how it repeats, as an RFC 5545 rule such as FREQ=WEEKLY;BYDAY=MO;COUNT=10"
389
+ },
390
+ {
391
+ name: "--hours",
392
+ value: "<from-to>",
393
+ role: "target",
394
+ type: "string",
395
+ meaning: "the working hours of each day to look in, such as 09:00-17:00, in the owner's time zone"
396
+ },
397
+ {
398
+ name: "--series",
399
+ role: "target",
400
+ type: "switch",
401
+ meaning: "act on the whole repeating event, not only this occurrence"
402
+ }
403
+ ];
404
+
405
+ // node_modules/.pnpm/@wirecat+cli-base@0.64.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-how.js
342
406
  var HOW_FLAGS = [
343
407
  {
344
408
  name: "--limit",
@@ -649,7 +713,13 @@ var HOW_FLAGS = [
649
713
  meaning: "do not keep this run, whatever the configuration says"
650
714
  },
651
715
  { name: "--no-registries", role: "mode", type: "switch", meaning: "do not ask the public ban lists" },
652
- { name: "--notify", role: "mode", type: "switch", meaning: "tell the chat's members about it" },
716
+ {
717
+ name: "--notify",
718
+ role: "mode",
719
+ type: "switch",
720
+ meaning: "tell the people it concerns about it: the chat's members, or an event's attendees"
721
+ },
722
+ { name: "--no-notify", role: "mode", type: "switch", meaning: "tell nobody about it" },
653
723
  { name: "--offline", role: "mode", type: "switch", meaning: "answer from what was recorded and never connect" },
654
724
  {
655
725
  name: "--operation-id",
@@ -1312,7 +1382,7 @@ var HOW_FLAGS = [
1312
1382
  }
1313
1383
  ];
1314
1384
 
1315
- // node_modules/.pnpm/@wirecat+cli-base@0.63.0_commander@15.0.0_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-what.js
1385
+ // node_modules/.pnpm/@wirecat+cli-base@0.64.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-what.js
1316
1386
  var WHAT_FLAGS = [
1317
1387
  {
1318
1388
  name: "--analysis-provider",
@@ -2295,7 +2365,7 @@ var WHAT_FLAGS = [
2295
2365
  }
2296
2366
  ];
2297
2367
 
2298
- // node_modules/.pnpm/@wirecat+cli-base@0.63.0_commander@15.0.0_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/vocabulary.js
2368
+ // node_modules/.pnpm/@wirecat+cli-base@0.64.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/vocabulary.js
2299
2369
  var FLAG_TYPES = [
2300
2370
  "switch",
2301
2371
  "count",
@@ -2412,6 +2482,7 @@ var verbs = [
2412
2482
  "bring the local store up to date from the source: only what changed, or the whole list where the source cannot say; a mirror syncs both ways"
2413
2483
  ],
2414
2484
  ["fetch", "one bounded pull of one named thing into the store, not a catch-up"],
2485
+ ["unsync", "stop syncing a thing; what the store already holds stays"],
2415
2486
  ["export", "write from the store to a file"],
2416
2487
  ["import", "bring a file or list the user gives into the store or the messenger, once"],
2417
2488
  ["download", "save a file from the source to this machine"],
@@ -2442,6 +2513,7 @@ var verbs = [
2442
2513
  ["unstar", "take the owner's star off a message"],
2443
2514
  ["vote", "answer a poll"],
2444
2515
  ["answer", "reply to a button someone pressed under a bot's message"],
2516
+ ["respond", "answer an invitation: accept, tentatively accept or decline it"],
2445
2517
  ["press", "press a button under a bot's message; the bot sees who pressed it"],
2446
2518
  ["action", "show what a bot is doing in a chat, such as typing, for a few seconds"],
2447
2519
  ["watch", "follow new events as they come, and keep them"],
@@ -2464,6 +2536,8 @@ var verbs = [
2464
2536
  ["acknowledge", "record successful delivery using the exact receipt issued when the item was claimed"],
2465
2537
  ["confirm", "the owner accepts what an agent proposed"],
2466
2538
  ["reject", "the owner refuses what an agent proposed"],
2539
+ ["review", "list what waits for the owner's decision"],
2540
+ ["resolve", "settle one thing that waits for the owner's decision, with the owner's choice"],
2467
2541
  ["move", "move a file in the source"],
2468
2542
  ["copy", "copy a file in the source"],
2469
2543
  ["run", "run a saved job once, now, as its timer would"],
@@ -2530,6 +2604,9 @@ var collections = [
2530
2604
  ["files", "files in the source, such as Google Drive, read and changed there"],
2531
2605
  ["comments", "comments people left on a thing in the source: a channel post or a file"],
2532
2606
  ["meetings", "stored meetings, from Zoom or another provider"],
2607
+ ["calendars", "calendars of an account, each synced or not"],
2608
+ ["events", "calendar entries: meetings, appointments and other things on a calendar"],
2609
+ ["people", "persons the owner deals with, such as the attendees of events"],
2533
2610
  ["recordings", "the files a provider recorded of a meeting"],
2534
2611
  ["jobs", "work this tool runs in the background or on a timer"],
2535
2612
  ["actions", "what an agent proposes to do; the owner confirms or rejects each"],
@@ -2591,6 +2668,7 @@ var views = [
2591
2668
  ["evidence", "the stored messages or lines a result or a reference rests on"],
2592
2669
  ["passage", "a cited transcript line with bounded surrounding lines from the same revision"],
2593
2670
  ["agenda", "what needs a look today"],
2671
+ ["busy", "when calendars or people are taken, without what takes them"],
2594
2672
  ["categories", "the categories a thing takes, with what each means"],
2595
2673
  ["domains", "the internet domains links point to, most linked first"],
2596
2674
  ["places", "the street addresses confirmed as places, most mentioned first"],
@@ -2636,10 +2714,10 @@ var VOCABULARY = defineVocabulary({
2636
2714
  ],
2637
2715
  views: views.map(([entry, meaning]) => ({ word: entry, meaning })),
2638
2716
  roots: roots.map(([entry, meaning]) => ({ word: entry, meaning })),
2639
- flags: [...HOW_FLAGS, ...WHAT_FLAGS]
2717
+ flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS]
2640
2718
  });
2641
2719
 
2642
- // node_modules/.pnpm/@wirecat+cli-core@0.452.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.63.0_commander@15._e609b9d6c8060966368a91e843fe8bd2/node_modules/@wirecat/cli-core/dist/mcp/agent.js
2720
+ // node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/agent.js
2643
2721
  var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
2644
2722
  var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
2645
2723
  var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
@@ -2664,9 +2742,10 @@ var optionKind = /* @__PURE__ */ __name((option, long) => {
2664
2742
  return "repeat";
2665
2743
  return /\.\.\.[>\]]/.test(option.flags) ? "variadic" : "text";
2666
2744
  }, "optionKind");
2667
- var optionField = /* @__PURE__ */ __name((option, long, negatable = false) => {
2745
+ var CLEARS = /\bempty clears\b/;
2746
+ var optionField = /* @__PURE__ */ __name((option, long, negated) => {
2668
2747
  const kind = optionKind(option, long);
2669
- const about = option.description;
2748
+ const about = negated ? `${option.description}; false: ${negated.description}` : option.description;
2670
2749
  const schema = kind === "switch" ? pipe(boolean(), description(about)) : option.choices ? pipe(picklist(option.choices), description(about)) : kind === "count" ? (
2671
2750
  // The command judges the range: `--thread-hops 0` is one, `--limit 0` is not.
2672
2751
  pipe(number(), integer(), minValue(0), description(about))
@@ -2676,7 +2755,7 @@ var optionField = /* @__PURE__ */ __name((option, long, negatable = false) => {
2676
2755
  ) : kind === "variadic" ? pipe(array(text2("one value")), minLength(1), description(about)) : kind === "json" ? (
2677
2756
  // A next step hands back the object an answer gave; the command takes it as JSON text.
2678
2757
  pipe(union([string(), record(string(), unknown())]), description(about))
2679
- ) : text2(about);
2758
+ ) : CLEARS.test(about) ? pipe(string(), regex(/^(?!-$)/, "not only -"), description(about)) : text2(about);
2680
2759
  return {
2681
2760
  name: snake(long.slice(2)),
2682
2761
  required: option.mandatory,
@@ -2684,7 +2763,7 @@ var optionField = /* @__PURE__ */ __name((option, long, negatable = false) => {
2684
2763
  positional: false,
2685
2764
  argv: /* @__PURE__ */ __name((value) => {
2686
2765
  if (kind === "switch")
2687
- return value === true ? [long] : negatable ? [`--no-${long.slice(2)}`] : [];
2766
+ return value === true ? [long] : negated ? [`--no-${long.slice(2)}`] : [];
2688
2767
  if (kind === "variadic")
2689
2768
  return value.map((one) => `${long}=${String(one)}`);
2690
2769
  if (kind === "repeat")
@@ -2728,12 +2807,15 @@ var fieldsOf = /* @__PURE__ */ __name((info, { omit = [], offline = false, stdin
2728
2807
  const read = stdin?.(info.path);
2729
2808
  if (read)
2730
2809
  fields.push(stdinField(read));
2731
- const longs = new Set(info.options.map(longOf));
2810
+ const switches = new Map(info.options.filter((one) => !one.takes_value).map((one) => [longOf(one), one]));
2732
2811
  for (const option of info.options) {
2733
2812
  const long = longOf(option);
2734
2813
  if (!long || option.mcp === false)
2735
2814
  continue;
2736
- const field = optionField(option, long, longs.has(`--no-${long.slice(2)}`));
2815
+ const positive = long.startsWith("--no-") ? switches.get(`--${long.slice(5)}`) : void 0;
2816
+ if (positive && positive.mcp !== false)
2817
+ continue;
2818
+ const field = optionField(option, long, option.takes_value ? void 0 : switches.get(`--no-${long.slice(2)}`));
2737
2819
  if (!fields.some((existing) => existing.name === field.name))
2738
2820
  fields.push(field);
2739
2821
  }
@@ -2821,7 +2903,8 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
2821
2903
  }, "failure"),
2822
2904
  ...ctx.overrides?.length ? { overrides: ctx.overrides } : {},
2823
2905
  authority: levels !== void 0 && authorityAllowed(levels),
2824
- botApi: levels !== void 0 && botApiAllowed(levels)
2906
+ botApi: levels !== void 0 && botApiAllowed(levels),
2907
+ ...ctx.caller ?? currentCaller() ? { caller: ctx.caller ?? currentCaller() } : {}
2825
2908
  },
2826
2909
  // Opened only when the command asks: a read the store answers never connects.
2827
2910
  ...lend ? {
@@ -2846,7 +2929,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
2846
2929
  }
2847
2930
  }, "runCommandForAgent");
2848
2931
 
2849
- // node_modules/.pnpm/@wirecat+cli-core@0.452.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.63.0_commander@15._e609b9d6c8060966368a91e843fe8bd2/node_modules/@wirecat/cli-core/dist/mcp/tool.js
2932
+ // node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/tool.js
2850
2933
  var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
2851
2934
  var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
2852
2935
  var message = pipe(
@@ -2911,16 +2994,22 @@ var entryRunner = /* @__PURE__ */ __name((registration) => {
2911
2994
  const command = `mcp ${commandOf(key2, definition)}`;
2912
2995
  const traceId = traceIdOf(ctx?.mcpReq?._meta?.traceparent);
2913
2996
  const app = registration.messenger?.app;
2914
- const recording = key2 !== "runs_search" && registration.defaults.history !== false && app?.appName ? startRecording({
2997
+ const caller = registration.callers ? callerOf(ctx, key2, registration.callers) : currentCaller();
2998
+ const env = registration.defaults.env ?? process.env;
2999
+ const settings = registration.defaults.settings;
3000
+ const recording = key2 !== "runs_search" && settings.keepFailedRuns !== false && app?.appName ? startRecording({
2915
3001
  app,
2916
3002
  command,
2917
- ...registration.defaults.settings.profile === void 0 ? {} : { profile: registration.defaults.settings.profile },
2918
- env: registration.defaults.env,
2919
- record: false,
3003
+ ...settings.profile === void 0 ? {} : { profile: settings.profile },
3004
+ env,
3005
+ record: keepsSuccess({ record: settings.record ?? true, fromFlag: false, env, caller }),
2920
3006
  keepFailed: true,
2921
3007
  trace: false,
2922
3008
  format: "json",
2923
- context: runContextOf({ bin: app.command, command, env: registration.defaults.env ?? process.env }),
3009
+ context: runContextOf({ bin: app.command, command, env, caller }),
3010
+ ...settings.keepRunsForDays === void 0 ? {} : { keepDays: settings.keepRunsForDays },
3011
+ ...settings.keepSuccessfulRunsForDays === void 0 ? {} : { keepSuccessDays: settings.keepSuccessfulRunsForDays },
3012
+ ...settings.runsSizeLimitMb === void 0 ? {} : { maxBytes: settings.runsSizeLimitMb * 1024 * 1024 },
2924
3013
  ...traceId === void 0 ? {} : { traceId }
2925
3014
  }) : void 0;
2926
3015
  const profile = registration.defaults.settings.profile;
@@ -2929,16 +3018,18 @@ var entryRunner = /* @__PURE__ */ __name((registration) => {
2929
3018
  command,
2930
3019
  startedAt,
2931
3020
  ...profile === void 0 ? {} : { profile },
2932
- ...traceId === void 0 ? {} : { traceId }
3021
+ ...traceId === void 0 ? {} : { traceId },
3022
+ ...recording ? { events: recording.events } : {}
2933
3023
  };
2934
- const result = await inRun(scope, () => {
3024
+ const work = /* @__PURE__ */ __name(() => inRun(scope, () => {
2935
3025
  const input = inputOf(definition, syncAllowedFor(key2, registration.defaults));
2936
3026
  const parsed = safeParse(input, args);
2937
3027
  return parsed.success ? run(key2, definition, parsed.output, ctx) : failed(new CliError("validation_error", `${commandOf(key2, definition)}: ${summarize(parsed.issues)}`, {
2938
3028
  arguments: toJsonSchema(input)
2939
3029
  }), app?.errors);
2940
- });
2941
- if (recording && (result.isError || partialOutcome(result.structuredContent))) {
3030
+ }), "work");
3031
+ const result = await (caller ? withCaller(caller, work) : work());
3032
+ if (recording) {
2942
3033
  if (result.isError) {
2943
3034
  const error = result.structuredContent?.error;
2944
3035
  const code = error?.code && errorCodes.includes(error.code) ? error.code : void 0;
@@ -3097,7 +3188,8 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
3097
3188
  return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(error, context))));
3098
3189
  }, "failed");
3099
3190
 
3100
- // node_modules/.pnpm/@wirecat+cli-core@0.452.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.63.0_commander@15._e609b9d6c8060966368a91e843fe8bd2/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3191
+ // node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3192
+ import { randomUUID } from "node:crypto";
3101
3193
  var MATCHES = 8;
3102
3194
  var ANSWER = answerSchema();
3103
3195
  var normal = /* @__PURE__ */ __name((command) => command.trim().toLowerCase().split(/[\s_-]+/).join(" "), "normal");
@@ -3169,6 +3261,11 @@ var registerCommands = /* @__PURE__ */ __name((server, prefix, commands, errors,
3169
3261
  });
3170
3262
  return answered(list);
3171
3263
  });
3264
+ const callers = {
3265
+ env: process.env,
3266
+ client: /* @__PURE__ */ __name(() => server.server.getClientVersion(), "client"),
3267
+ connectionId: randomUUID()
3268
+ };
3172
3269
  const runner = /* @__PURE__ */ __name((writing) => async ({ command: asked, arguments: given }, ctx) => {
3173
3270
  try {
3174
3271
  const command = byNormal.get(normal(asked));
@@ -3181,14 +3278,15 @@ var registerCommands = /* @__PURE__ */ __name((server, prefix, commands, errors,
3181
3278
  if (one.writes !== writing)
3182
3279
  throw new CliError("validation_error", `"${command}" ${writing ? "only reads" : "writes"}: call it with ${prefix}_${writing ? "read" : "write"}`);
3183
3280
  const args = writing ? agentArguments(given ?? {}) : given ?? {};
3281
+ const caller = currentCaller() ?? callerOf(ctx, command.replace(/[ -]/g, "_"), callers);
3184
3282
  if (one.checked)
3185
- return runnableOnly(await one.run(args, ctx), (named) => byNormal.has(normal(named)));
3283
+ return runnableOnly(await withCaller(caller, () => one.run(args, ctx)), (named) => byNormal.has(normal(named)));
3186
3284
  const parsed = safeParse(strictObject(one.input.entries), args);
3187
3285
  if (!parsed.success)
3188
3286
  throw new CliError("validation_error", `${command}: ${summarize(parsed.issues)}`, {
3189
3287
  arguments: toJsonSchema(one.input)
3190
3288
  });
3191
- return runnableOnly(await one.run(parsed.output, ctx), (named) => byNormal.has(normal(named)));
3289
+ return runnableOnly(await withCaller(caller, () => one.run(parsed.output, ctx)), (named) => byNormal.has(normal(named)));
3192
3290
  } catch (error) {
3193
3291
  return failed(error, errors);
3194
3292
  }