@wirecat/tg-cli 0.123.0 → 0.124.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 (131) hide show
  1. package/contracts/wirecat.json +47 -4
  2. package/dist/bin/tg.js +2 -2
  3. package/dist/bundle/{adapter-GAOG65O2.js → adapter-GEIZVMWU.js} +55 -53
  4. package/dist/bundle/{all-profiles-HLE6PHNI.js → all-profiles-EY4GJFWN.js} +10 -10
  5. package/dist/bundle/{anthropic-FZC4BS7T.js → anthropic-RIANJ7WM.js} +17 -10
  6. package/dist/bundle/{app-server-SHZNMV27.js → app-server-LW7WBFIF.js} +62 -52
  7. package/dist/bundle/{bot-api-LRS2KMDE.js → bot-api-FHIQ66OM.js} +54 -52
  8. package/dist/bundle/{bot-history-IJ7ZZKW5.js → bot-history-O34YZEFH.js} +18 -18
  9. package/dist/bundle/{bun-FACL53HM.js → bun-MJWD4VGV.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-B2MD7RTL.js → bun-sqlite-LCHVO3OB.js} +6 -6
  11. package/dist/bundle/{chunk-3JISIGLP.js → chunk-2GFGZDWS.js} +2 -2
  12. package/dist/bundle/{chunk-EOUUI5FI.js → chunk-2NG4JPP7.js} +4 -4
  13. package/dist/bundle/{chunk-V4722KYX.js → chunk-2YLIVDWJ.js} +2 -2
  14. package/dist/bundle/chunk-3PLMMFP6.js +1068 -0
  15. package/dist/bundle/{chunk-Z5HHBTS5.js → chunk-3VVZFBE2.js} +23 -4
  16. package/dist/bundle/{chunk-XDL4L3OI.js → chunk-42R4YO4L.js} +3609 -1620
  17. package/dist/bundle/{chunk-3S6KZCZ7.js → chunk-4CIVGT4P.js} +57 -28
  18. package/dist/bundle/{chunk-QLXKWAET.js → chunk-4EGB7GSW.js} +87 -19
  19. package/dist/bundle/chunk-54JPEGQA.js +71 -0
  20. package/dist/bundle/chunk-5EL6E6PW.js +13 -0
  21. package/dist/bundle/{chunk-V23X3W2W.js → chunk-7AWJZ6NJ.js} +8 -8
  22. package/dist/bundle/{chunk-UB6J5HRW.js → chunk-A5RWKKBZ.js} +3 -3
  23. package/dist/bundle/{chunk-HJLTWT52.js → chunk-ASEBKZFY.js} +2 -2
  24. package/dist/bundle/{chunk-EISV5YWD.js → chunk-BV3HZYOX.js} +6959 -6230
  25. package/dist/bundle/{chunk-MFN5MSIL.js → chunk-CDSSKK5J.js} +3 -3
  26. package/dist/bundle/{chunk-7EFJHLKW.js → chunk-DFSLHF46.js} +1 -1
  27. package/dist/bundle/{chunk-E2Z4C6CQ.js → chunk-E66JBGZZ.js} +6 -6
  28. package/dist/bundle/{chunk-VUBZFMGP.js → chunk-E6VSARSU.js} +2 -2
  29. package/dist/bundle/{chunk-ZJPXRW65.js → chunk-F3GHTPAO.js} +4 -4
  30. package/dist/bundle/{chunk-SWGGYBCW.js → chunk-GUL6QLNI.js} +40 -21
  31. package/dist/bundle/{chunk-UBFDPLFQ.js → chunk-HEV23NIB.js} +6 -6
  32. package/dist/bundle/{chunk-EABZ2CUG.js → chunk-HSRO77SW.js} +34 -29
  33. package/dist/bundle/{chunk-ZOBRYIUG.js → chunk-I4JUKRW7.js} +2 -2
  34. package/dist/bundle/{chunk-QVMAZVSN.js → chunk-IK6XKMLL.js} +1 -1
  35. package/dist/bundle/{chunk-SNEJK4SN.js → chunk-ISGXVFA4.js} +4 -4
  36. package/dist/bundle/{chunk-KKMNMQMW.js → chunk-IVFUSI7G.js} +2 -2
  37. package/dist/bundle/{chunk-6FK2Z75N.js → chunk-KVJSCJGZ.js} +2 -2
  38. package/dist/bundle/{chunk-NYRAW4M5.js → chunk-LKMZ53GC.js} +4 -7
  39. package/dist/bundle/{chunk-B6G3TNN4.js → chunk-M4W4Y5YR.js} +132 -40
  40. package/dist/bundle/{chunk-BGUYYKS3.js → chunk-N5UM63JW.js} +343 -112
  41. package/dist/bundle/{chunk-OE5JMZSM.js → chunk-NL4COYPY.js} +9 -9
  42. package/dist/bundle/{chunk-3BUQXB7B.js → chunk-NQXVZ5WT.js} +15 -117
  43. package/dist/bundle/{chunk-DEMGDKCX.js → chunk-OH3IZ6GW.js} +2395 -2369
  44. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-OIF4B526.js} +1 -1
  45. package/dist/bundle/{chunk-4W4EVVL4.js → chunk-OK4M4MWI.js} +4 -4
  46. package/dist/bundle/{chunk-OOWE2O5U.js → chunk-OVDB5CQM.js} +1 -1
  47. package/dist/bundle/{chunk-PZQ2MQFX.js → chunk-PI4XXMPG.js} +6 -6
  48. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-PJGOQSE5.js} +1 -1
  49. package/dist/bundle/{chunk-U5FILNK6.js → chunk-PP4ZBLS4.js} +69 -6
  50. package/dist/bundle/{chunk-LVGX7VTD.js → chunk-PZ6H65D6.js} +4 -4
  51. package/dist/bundle/{chunk-4DCFLHLN.js → chunk-QFV36CAH.js} +4 -4
  52. package/dist/bundle/{chunk-Q74XVJFT.js → chunk-QGCVQRHV.js} +1 -1
  53. package/dist/bundle/{chunk-QLB3BFSN.js → chunk-QK4T3VN7.js} +1 -1
  54. package/dist/bundle/{chunk-5IHYZ6ED.js → chunk-QWAMX6CN.js} +12 -12
  55. package/dist/bundle/{chunk-SCGCDLI7.js → chunk-RBV4M2TC.js} +1 -1
  56. package/dist/bundle/{chunk-6KT5BTWL.js → chunk-RHJHOOUL.js} +341 -184
  57. package/dist/bundle/{chunk-STPYSD6W.js → chunk-SGBH3D5D.js} +3 -3
  58. package/dist/bundle/{chunk-ADI5R2MM.js → chunk-UII3D3HR.js} +51 -51
  59. package/dist/bundle/{chunk-PAHSIORC.js → chunk-UP3J3YXH.js} +6 -6
  60. package/dist/bundle/{chunk-SMFUKHG2.js → chunk-UR62DZ7Q.js} +24 -9
  61. package/dist/bundle/{chunk-ZQ3WGGKK.js → chunk-VAKSXD4F.js} +13 -13
  62. package/dist/bundle/{chunk-WA7YED3Y.js → chunk-VGUWIHXD.js} +1 -1
  63. package/dist/bundle/chunk-VIIIC5LU.js +32 -0
  64. package/dist/bundle/{chunk-3P7HWXDJ.js → chunk-VMWJGUVV.js} +14 -5
  65. package/dist/bundle/{chunk-V4JEZFW5.js → chunk-W4LMTNN2.js} +2 -2
  66. package/dist/bundle/{chunk-ENEMZAIJ.js → chunk-WKOVQ4OU.js} +14 -12
  67. package/dist/bundle/{chunk-T5OO7VDT.js → chunk-WSLIXJET.js} +3798 -3401
  68. package/dist/bundle/{chunk-WSLTW6MI.js → chunk-XDHGM2Z7.js} +3 -3
  69. package/dist/bundle/{chunk-5R5HGV2J.js → chunk-XSGUG5WG.js} +4 -4
  70. package/dist/bundle/{chunk-RDKPKS2P.js → chunk-YQFO7WXQ.js} +2 -2
  71. package/dist/bundle/{chunk-VVRWH5VH.js → chunk-ZL5YG2WK.js} +14 -9
  72. package/dist/bundle/{chunk-FFHX7VKP.js → chunk-ZNICTHSC.js} +1 -1
  73. package/dist/bundle/{chunk-BAB3ALHZ.js → chunk-ZTMV5M3D.js} +27 -25
  74. package/dist/bundle/command-contract-UKOL455D.js +34 -0
  75. package/dist/bundle/{command-server-entry-5LKDRLEX.js → command-server-entry-K52OEKIO.js} +24 -22
  76. package/dist/bundle/{decode-L4DQDHXA.js → decode-OAE25LEJ.js} +5 -5
  77. package/dist/bundle/{dispatch-PQSCFHEX.js → dispatch-6GVTXIZ2.js} +8 -8
  78. package/dist/bundle/{echarts-6LES2JIV.js → echarts-EO4ZGKMN.js} +2 -2
  79. package/dist/bundle/{embed-T5MLKX75.js → embed-TB2AS4AT.js} +6 -6
  80. package/dist/bundle/{embedder-56NMRLC5.js → embedder-YKC42G6L.js} +9 -9
  81. package/dist/bundle/{entry-U5GV6Y46.js → entry-AB6FU7BN.js} +9 -8
  82. package/dist/bundle/{failure-BX5HJAQE.js → failure-CY7ACT6V.js} +2 -2
  83. package/dist/bundle/{first-run-ISQ52V3I.js → first-run-CMQZHDI5.js} +11 -11
  84. package/dist/bundle/first-screen-XZ73W3VE.js +32 -0
  85. package/dist/bundle/{instructions-CJEXDI7E.js → instructions-RM3IB6ID.js} +1 -1
  86. package/dist/bundle/{mcp-7KQUJNFN.js → mcp-M5YCSWJJ.js} +2 -2
  87. package/dist/bundle/{node-QLWTGZW7.js → node-D2PM62TA.js} +2 -2
  88. package/dist/bundle/{node-sqlite-X2C3RR2Q.js → node-sqlite-UK5DE525.js} +7 -7
  89. package/dist/bundle/{oauth-VP3KMHLX.js → oauth-SKRG67A2.js} +7 -7
  90. package/dist/bundle/{open-GLR5EUZS.js → open-XP3SY62D.js} +5 -5
  91. package/dist/bundle/{openai-6CDCJ5LQ.js → openai-Q3U46UPA.js} +21 -17
  92. package/dist/bundle/{process-7FABZ3T2.js → process-YJ4LHMJB.js} +1 -1
  93. package/dist/bundle/{program-KUIAHJDX.js → program-EEPEFKTR.js} +80 -63
  94. package/dist/bundle/{prompt-XPHIZMD2.js → prompt-WYTODP4U.js} +5 -5
  95. package/dist/bundle/{proxy-transport-IIB7ZXIS.js → proxy-transport-HJMQ5QFT.js} +5 -5
  96. package/dist/bundle/{recognize-FVFYI3XX.js → recognize-K2S5QQU2.js} +4 -4
  97. package/dist/bundle/{remote-3AMCG2P4.js → remote-7RSAJ3JC.js} +9 -7
  98. package/dist/bundle/{rerank-XV4E25ML.js → rerank-RJX77BKD.js} +7 -7
  99. package/dist/bundle/{serve-NVSZA4UN.js → serve-3E7NN3VW.js} +14 -14
  100. package/dist/bundle/server-ITHYDPWQ.js +62 -0
  101. package/dist/bundle/{server-MBMPHRJE.js → server-O3KU56A4.js} +36 -35
  102. package/dist/bundle/sqlite-runtime-RCS5WSG5.js +19 -0
  103. package/dist/bundle/{state-JBMB2QUR.js → state-PLWSPSAG.js} +6 -6
  104. package/dist/bundle/store-3FYLH53Z.js +276 -0
  105. package/dist/bundle/{store-T4SCYTY2.js → store-DWMKCXYL.js} +15 -13
  106. package/dist/bundle/store-maintenance-command-3UEKINRB.js +52 -0
  107. package/dist/bundle/tg.js +13 -13
  108. package/dist/commands/account-removal.d.ts.map +1 -1
  109. package/dist/commands/account-removal.js +5 -3
  110. package/dist/commands/account-removal.js.map +1 -1
  111. package/dist/commands/session.d.ts.map +1 -1
  112. package/dist/commands/session.js +21 -3
  113. package/dist/commands/session.js.map +1 -1
  114. package/dist/paths.d.ts +6 -0
  115. package/dist/paths.d.ts.map +1 -1
  116. package/dist/paths.js +23 -2
  117. package/dist/paths.js.map +1 -1
  118. package/dist/program.d.ts +4 -1
  119. package/dist/program.d.ts.map +1 -1
  120. package/dist/program.js +5 -2
  121. package/dist/program.js.map +1 -1
  122. package/dist/version.d.ts +1 -1
  123. package/dist/version.js +1 -1
  124. package/package.json +4 -4
  125. package/dist/bundle/chunk-I7K4OR5Q.js +0 -265
  126. package/dist/bundle/chunk-PZJXQMSZ.js +0 -27
  127. package/dist/bundle/command-contract-HWSWHMO4.js +0 -33
  128. package/dist/bundle/first-screen-7L4AMZDO.js +0 -31
  129. package/dist/bundle/server-MHVGYRQZ.js +0 -61
  130. package/dist/bundle/store-maintenance-command-F7WQMTMP.js +0 -49
  131. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-HVJJWJYQ.js} +0 -0
@@ -7,10 +7,10 @@ import {
7
7
  agentJson,
8
8
  commandAvailability,
9
9
  failureContext
10
- } from "./chunk-QLXKWAET.js";
10
+ } from "./chunk-4EGB7GSW.js";
11
11
  import {
12
12
  callerOf
13
- } from "./chunk-3JISIGLP.js";
13
+ } from "./chunk-2GFGZDWS.js";
14
14
  import {
15
15
  QUERY_ARGUMENT,
16
16
  lentConnection,
@@ -18,10 +18,10 @@ import {
18
18
  refuseLacking,
19
19
  servicesFor,
20
20
  storeModeDeps
21
- } from "./chunk-T5OO7VDT.js";
21
+ } from "./chunk-WSLIXJET.js";
22
22
  import {
23
23
  MAX_BUFFERED_INPUT
24
- } from "./chunk-V4JEZFW5.js";
24
+ } from "./chunk-W4LMTNN2.js";
25
25
  import {
26
26
  DEFAULT_OUTPUT_BYTES,
27
27
  ENTITIES,
@@ -41,27 +41,27 @@ import {
41
41
  refuseStoreChange,
42
42
  sealed,
43
43
  startRecording
44
- } from "./chunk-6KT5BTWL.js";
44
+ } from "./chunk-RHJHOOUL.js";
45
45
  import {
46
46
  currentCaller,
47
47
  keepsSuccess,
48
48
  runContextOf,
49
49
  withCaller
50
- } from "./chunk-VVRWH5VH.js";
50
+ } from "./chunk-ZL5YG2WK.js";
51
51
  import {
52
52
  enclosingTraceId,
53
53
  inRun,
54
54
  newRunId,
55
55
  queryDescription,
56
56
  traceOf
57
- } from "./chunk-DEMGDKCX.js";
57
+ } from "./chunk-OH3IZ6GW.js";
58
58
  import {
59
59
  storeDamaged
60
- } from "./chunk-Z5HHBTS5.js";
60
+ } from "./chunk-3VVZFBE2.js";
61
61
  import {
62
62
  captureStreams,
63
63
  traceIdOf
64
- } from "./chunk-3S6KZCZ7.js";
64
+ } from "./chunk-4CIVGT4P.js";
65
65
  import {
66
66
  COMPACT_FLAG,
67
67
  SNAKE_CASE,
@@ -100,25 +100,25 @@ import {
100
100
  unknown,
101
101
  word,
102
102
  writes
103
- } from "./chunk-SMFUKHG2.js";
103
+ } from "./chunk-UR62DZ7Q.js";
104
104
  import {
105
105
  CliError,
106
106
  errorCodes
107
- } from "./chunk-VUBZFMGP.js";
107
+ } from "./chunk-E6VSARSU.js";
108
108
  import {
109
109
  __name
110
110
  } from "./chunk-ZVVMGPBJ.js";
111
111
 
112
- // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._d745f308dd36458ab3f46a9ad7a22686/node_modules/@wirecat/cli-core/dist/mcp/agent.js
112
+ // node_modules/.pnpm/@wirecat+cli-core@0.648.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.98.0_commander@15._22e948f6f1aa7f4572ea465a838ccfd1/node_modules/@wirecat/cli-core/dist/mcp/agent.js
113
113
  import { Readable } from "node:stream";
114
114
 
115
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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
115
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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
116
116
  var LINT_SEVERITIES = ["high", "medium", "low"];
117
117
  var lintRuleSchema = strictObject({
118
118
  id: word,
119
119
  severity: picklist(LINT_SEVERITIES),
120
120
  /** What the rule looks at; a violation's target names one of these. */
121
- scope: picklist(["command", "group", "argument", "option", "flag", "key", "source"]),
121
+ scope: picklist(["command", "group", "argument", "option", "flag", "key", "source", "type"]),
122
122
  summary: text
123
123
  });
124
124
  var defineLintRules = /* @__PURE__ */ __name((input) => parseRegistry("lint rules", array(lintRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineLintRules");
@@ -156,7 +156,7 @@ var LINT_RULES = defineLintRules([
156
156
  },
157
157
  {
158
158
  id: "command-example-count",
159
- severity: "medium",
159
+ severity: "low",
160
160
  scope: "command",
161
161
  summary: "a leaf command has one to three examples; generated commands are exempt"
162
162
  },
@@ -239,6 +239,12 @@ var LINT_RULES = defineLintRules([
239
239
  severity: "medium",
240
240
  scope: "source",
241
241
  summary: "every `http(s)://` host in the CLI's own source is in the manifest's `network.hosts`"
242
+ },
243
+ {
244
+ id: "result-shape",
245
+ severity: "medium",
246
+ scope: "type",
247
+ summary: "a list or search in the published TypeScript API returns `{ items, hasMore, nextOffset?, total? }`: no bare array, no `hits` or `has_more`"
242
248
  }
243
249
  ]);
244
250
  var baselineSchema = array(text);
@@ -252,7 +258,7 @@ var overrideSchema = strictObject({
252
258
  });
253
259
  var overridesSchema = array(overrideSchema);
254
260
 
255
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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
261
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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
256
262
  var auditRuleSchema = strictObject({ id: word, severity: picklist(LINT_SEVERITIES), summary: text });
257
263
  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");
258
264
  var AUDIT_RULES = defineAuditRules([
@@ -304,7 +310,9 @@ var parityGroupSchema = strictObject({
304
310
  absent: optional(word),
305
311
  /** The one CLI that has the path or flag by design; every other CLI compared must lack it. */
306
312
  only: optional(word),
307
- reason: pipe(text, minLength(10, "say why, in a sentence"))
313
+ reason: pipe(text, minLength(10, "say why, in a sentence")),
314
+ /** Warns from 14 days before and fails 14 days after, as a lint override does. */
315
+ review_after: optional(pipe(string(), isoDate("a date, YYYY-MM-DD")))
308
316
  }))
309
317
  });
310
318
  var defineParityGroups = /* @__PURE__ */ __name((input) => parseRegistry("parity groups", array(parityGroupSchema), input, (groups) => [
@@ -378,7 +386,7 @@ var REQUIRED_ROOTS = defineRequiredRoots([
378
386
  { path: ["upgrade"], meaning: "updates the CLI" }
379
387
  ]);
380
388
 
381
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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
389
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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
382
390
  var fieldRuleSchema = strictObject({ id: word, rule: text });
383
391
  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");
384
392
  var FIELD_RULES = defineFieldRules([
@@ -394,7 +402,7 @@ var FIELD_RULES = defineFieldRules([
394
402
  }
395
403
  ]);
396
404
 
397
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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
405
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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
398
406
  var key = pipe(string(), regex(SNAKE_CASE, "a snake_case key"));
399
407
  var identifierSchema = strictObject({ key, meaning: text, replaces: optional(array(key)) });
400
408
  var defineIdentifiers = /* @__PURE__ */ __name((input) => parseRegistry("identifiers", array(identifierSchema), input, (identifiers) => {
@@ -416,7 +424,44 @@ var IDENTIFIERS = defineIdentifiers([
416
424
  { key: "trace_id", meaning: "the distributed trace a run belongs to, from `traceparent`" }
417
425
  ]);
418
426
 
419
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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
427
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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-account.js
428
+ var ACCOUNT_FLAGS = [
429
+ {
430
+ name: "--client-id",
431
+ value: "<id>",
432
+ role: "mode",
433
+ type: "id",
434
+ meaning: "sign in through the owner's own OAuth app with this client ID instead of WireCat's (WC-SECR-25)"
435
+ },
436
+ {
437
+ name: "--client-file",
438
+ value: "<file>",
439
+ role: "mode",
440
+ type: "path",
441
+ meaning: "sign in through the owner's own OAuth app read from this client JSON instead of WireCat's (WC-SECR-25)"
442
+ },
443
+ {
444
+ name: "--keep-data",
445
+ role: "mode",
446
+ type: "switch",
447
+ meaning: "remove the account but leave what the store holds of it, still searchable"
448
+ },
449
+ {
450
+ name: "--delete-data",
451
+ role: "mode",
452
+ type: "switch",
453
+ meaning: "remove the account and delete what the store and the tool's files hold of it"
454
+ },
455
+ {
456
+ name: "--answer-stdin",
457
+ role: "mode",
458
+ type: "switch",
459
+ meaning: "a sign-in step asks its question as a JSON line and reads the answer from stdin"
460
+ },
461
+ { name: "--hide-phone", role: "output", type: "switch", meaning: "leave the phone number out of the answer" }
462
+ ];
463
+
464
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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
420
465
  var CALENDAR_FLAGS = [
421
466
  { name: "--end-time", value: "<time>", role: "value", type: "time", meaning: "when it ends" },
422
467
  {
@@ -490,7 +535,7 @@ var CALENDAR_FLAGS = [
490
535
  }
491
536
  ];
492
537
 
493
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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-crm.js
538
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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-crm.js
494
539
  var CRM_FLAGS = [
495
540
  {
496
541
  name: "--pipeline",
@@ -640,7 +685,7 @@ var CRM_FLAGS = [
640
685
  }
641
686
  ];
642
687
 
643
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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
688
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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
644
689
  var HOW_FLAGS = [
645
690
  {
646
691
  name: "--limit",
@@ -867,7 +912,6 @@ var HOW_FLAGS = [
867
912
  meaning: "expose meeting preparation tools, including their remote schedule reads"
868
913
  },
869
914
  { name: "--dry-run", role: "mode", type: "switch", meaning: "judge and plan; do nothing", replaces: ["--estimate"] },
870
- { name: "--accept-terms", role: "mode", type: "switch", meaning: "accept the model's licence terms" },
871
915
  {
872
916
  name: "--as-owner",
873
917
  role: "mode",
@@ -1638,8 +1682,14 @@ var HOW_FLAGS = [
1638
1682
  }
1639
1683
  ];
1640
1684
 
1641
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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-knowledge.js
1685
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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-knowledge.js
1642
1686
  var KNOWLEDGE_FLAGS = [
1687
+ {
1688
+ name: "--accept-terms",
1689
+ role: "mode",
1690
+ type: "switch",
1691
+ meaning: "no longer needed; kept so older scripts still run"
1692
+ },
1643
1693
  {
1644
1694
  name: "--quote",
1645
1695
  value: "<ref=words...>",
@@ -1670,7 +1720,7 @@ var KNOWLEDGE_FLAGS = [
1670
1720
  }
1671
1721
  ];
1672
1722
 
1673
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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-mail.js
1723
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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-mail.js
1674
1724
  var MAIL_FLAGS = [
1675
1725
  {
1676
1726
  name: "--cc",
@@ -1700,7 +1750,7 @@ var MAIL_FLAGS = [
1700
1750
  }
1701
1751
  ];
1702
1752
 
1703
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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-privacy.js
1753
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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-privacy.js
1704
1754
  var PRIVACY_FLAGS = [
1705
1755
  {
1706
1756
  name: "--about-text",
@@ -1761,7 +1811,7 @@ var PRIVACY_FLAGS = [
1761
1811
  { name: "--read-receipts", value: "<on|off>", role: "value", type: "choice", meaning: "send read receipts" }
1762
1812
  ];
1763
1813
 
1764
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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-schedule.js
1814
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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-schedule.js
1765
1815
  var SCHEDULE_FLAGS = [
1766
1816
  {
1767
1817
  name: "--locale",
@@ -1794,7 +1844,7 @@ var SCHEDULE_FLAGS = [
1794
1844
  }
1795
1845
  ];
1796
1846
 
1797
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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
1847
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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
1798
1848
  var WHAT_FLAGS = [
1799
1849
  {
1800
1850
  name: "--analysis-provider",
@@ -2110,6 +2160,13 @@ var WHAT_FLAGS = [
2110
2160
  type: "list",
2111
2161
  meaning: "the agents to install for, comma-separated"
2112
2162
  },
2163
+ {
2164
+ name: "--from",
2165
+ value: "<person>",
2166
+ role: "target",
2167
+ type: "id",
2168
+ meaning: "a person: the one identities leave, or the one who sent it; a search takes it repeated for any of several"
2169
+ },
2113
2170
  {
2114
2171
  name: "--from-dir",
2115
2172
  value: "<dir>",
@@ -2784,7 +2841,7 @@ var WHAT_FLAGS = [
2784
2841
  }
2785
2842
  ];
2786
2843
 
2787
- // node_modules/.pnpm/@wirecat+cli-base@0.93.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
2844
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.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
2788
2845
  var FLAG_TYPES = [
2789
2846
  "switch",
2790
2847
  "count",
@@ -2938,6 +2995,7 @@ var verbs = [
2938
2995
  "look at a source before taking anything from it: a chat link without joining, a mailbox without importing"
2939
2996
  ],
2940
2997
  ["send", "send a message"],
2998
+ ["call", "call one provider API method by its own name, generated from the provider's method list"],
2941
2999
  ["edit", "change a sent message"],
2942
3000
  ["forward", "send an existing message on to another chat"],
2943
3001
  ["pin", "pin a message or chat"],
@@ -3144,6 +3202,7 @@ var views = [
3144
3202
  ["categories", "the categories a thing takes, with what each means"],
3145
3203
  ["domains", "the internet domains links point to, most linked first"],
3146
3204
  ["places", "the street addresses confirmed as places, most mentioned first"],
3205
+ ["mentions", "the people and organizations named in a selected thing's text"],
3147
3206
  ["comments", "replies attached to a selected source item"],
3148
3207
  ["links", "links held for a selected thing"],
3149
3208
  ["voters", "people whose recorded votes are visible for a selected poll"],
@@ -3192,6 +3251,7 @@ var VOCABULARY = defineVocabulary({
3192
3251
  ...HOW_FLAGS,
3193
3252
  ...WHAT_FLAGS,
3194
3253
  ...PRIVACY_FLAGS,
3254
+ ...ACCOUNT_FLAGS,
3195
3255
  ...CALENDAR_FLAGS,
3196
3256
  ...MAIL_FLAGS,
3197
3257
  ...KNOWLEDGE_FLAGS,
@@ -3200,7 +3260,7 @@ var VOCABULARY = defineVocabulary({
3200
3260
  ]
3201
3261
  });
3202
3262
 
3203
- // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._d745f308dd36458ab3f46a9ad7a22686/node_modules/@wirecat/cli-core/dist/mcp/agent.js
3263
+ // node_modules/.pnpm/@wirecat+cli-core@0.648.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.98.0_commander@15._22e948f6f1aa7f4572ea465a838ccfd1/node_modules/@wirecat/cli-core/dist/mcp/agent.js
3204
3264
  var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
3205
3265
  var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
3206
3266
  var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
@@ -3310,6 +3370,9 @@ var fieldsOf = /* @__PURE__ */ __name((info, { omit = [], offline = false, stdin
3310
3370
  }, "fieldsOf");
3311
3371
  var schemaOf = /* @__PURE__ */ __name((fields) => object(Object.fromEntries(fields.map((field) => [field.name, field.required ? field.schema : optional(field.schema)]))), "schemaOf");
3312
3372
  var startsWith = /* @__PURE__ */ __name((path, prefix) => prefix.every((word2, at) => path[at] === word2), "startsWith");
3373
+ var keywordsOf = /* @__PURE__ */ __name((examples) => [
3374
+ ...new Set(examples.flatMap((example) => example.split(/\s+/u).filter((word2) => word2 !== "" && !word2.startsWith("-"))))
3375
+ ], "keywordsOf");
3313
3376
  var toolsFromCommands = /* @__PURE__ */ __name((commands, options = {}) => {
3314
3377
  const { root = [], exclude = [], levels, keyOf, authority, readOnly = false, permissions } = options;
3315
3378
  return flatten(commands).filter((info) => (
@@ -3321,6 +3384,7 @@ var toolsFromCommands = /* @__PURE__ */ __name((commands, options = {}) => {
3321
3384
  path: info.path,
3322
3385
  title: info.summary ?? info.description,
3323
3386
  description: info.description,
3387
+ ...info.examples?.length ? { keywords: keywordsOf(info.examples) } : {},
3324
3388
  writes: writes(info.effects) && options.fetchOnly?.(info.path) !== true,
3325
3389
  input: schemaOf(fieldsOf(info, options)),
3326
3390
  ...info.output ? { output: info.output } : {}
@@ -3423,7 +3487,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
3423
3487
  }
3424
3488
  }, "runCommandForAgent");
3425
3489
 
3426
- // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._d745f308dd36458ab3f46a9ad7a22686/node_modules/@wirecat/cli-core/dist/mcp/tool.js
3490
+ // node_modules/.pnpm/@wirecat+cli-core@0.648.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.98.0_commander@15._22e948f6f1aa7f4572ea465a838ccfd1/node_modules/@wirecat/cli-core/dist/mcp/tool.js
3427
3491
  var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
3428
3492
  var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
3429
3493
  var message = pipe(
@@ -3682,7 +3746,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
3682
3746
  return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(storeDamaged(error), context))));
3683
3747
  }, "failed");
3684
3748
 
3685
- // node_modules/.pnpm/@wirecat+cli-core@0.633.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._d745f308dd36458ab3f46a9ad7a22686/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3749
+ // node_modules/.pnpm/@wirecat+cli-core@0.648.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.98.0_commander@15._22e948f6f1aa7f4572ea465a838ccfd1/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3686
3750
  import { randomUUID } from "node:crypto";
3687
3751
  var MATCHES = 8;
3688
3752
  var ANSWER = answerSchema();
@@ -3704,15 +3768,43 @@ var listedAs = /* @__PURE__ */ __name((prefix, writes2) => {
3704
3768
  return { "~standard": { ...checked["~standard"], jsonSchema: shown } };
3705
3769
  }, "listedAs");
3706
3770
  var normal = /* @__PURE__ */ __name((command) => command.trim().toLowerCase().split(/[\s_-]+/).join(" "), "normal");
3707
- var haystack = /* @__PURE__ */ __name((command, one) => [command, one.title, one.description, ...Object.keys(one.input.entries)].join(" ").toLowerCase(), "haystack");
3771
+ var STOP_WORDS = new Set("a an the to of in on at by for from with into out about and or but is are be been was were it its this that these those which who whom whose what when where how do does did can could should would will my our your their his her them they we you i one some any all each every another other".split(" "));
3772
+ var wordsOf = /* @__PURE__ */ __name((text3) => text3.toLowerCase().split(/[^\p{L}\p{N}]+/u).filter(Boolean), "wordsOf");
3773
+ var stem = /* @__PURE__ */ __name((word2) => {
3774
+ const bare = word2.replace(/'s$/u, "");
3775
+ if (bare.length > 4 && bare.endsWith("ies"))
3776
+ return `${bare.slice(0, -3)}y`;
3777
+ for (const ending of ["ing", "ed", "es", "s"])
3778
+ if (bare.length - ending.length >= 3 && bare.endsWith(ending))
3779
+ return bare.slice(0, -ending.length);
3780
+ return bare;
3781
+ }, "stem");
3782
+ var sameWord = /* @__PURE__ */ __name((asked, known) => {
3783
+ if (asked === known)
3784
+ return true;
3785
+ const [short, long] = asked.length <= known.length ? [asked, known] : [known, asked];
3786
+ return short.length >= 3 && long.startsWith(short);
3787
+ }, "sameWord");
3788
+ var fieldsOf2 = /* @__PURE__ */ __name((command, one) => [
3789
+ [4, [...wordsOf(command), ...(one.aliases ?? []).flatMap(wordsOf)]],
3790
+ [2, wordsOf(one.title)],
3791
+ [1, [...wordsOf(one.description), ...(one.keywords ?? []).flatMap(wordsOf), ...Object.keys(one.input.entries)]]
3792
+ ].map(([weight, words]) => [weight, [...new Set(words.map(stem))]]), "fieldsOf");
3708
3793
  var search = /* @__PURE__ */ __name((commands, query) => {
3709
- const words = query.toLowerCase().split(/\s+/).filter(Boolean);
3710
- return Object.entries(commands).filter(([command, one]) => words.every((word2) => haystack(command, one).includes(word2))).map((entry) => {
3711
- const parts = entry[0].split(/[\s-]/);
3712
- const exact = entry[0] === words.join(" ") ? 100 : 0;
3713
- const whole = words.filter((word2) => parts.includes(word2)).length * 10;
3714
- return { entry, rank: exact + whole + words.filter((word2) => entry[0].includes(word2)).length };
3715
- }).sort((a, b) => b.rank - a.rank || a.entry[0].localeCompare(b.entry[0])).map(({ entry }) => entry);
3794
+ const named = normal(query);
3795
+ const all = Object.entries(commands);
3796
+ if (!named)
3797
+ return all.map((entry) => entry).sort((a, b) => a[0].localeCompare(b[0]));
3798
+ const words = [
3799
+ ...new Set(wordsOf(query).filter((word2) => word2.length > 1 && !STOP_WORDS.has(word2)).map(stem))
3800
+ ];
3801
+ return all.map((entry) => {
3802
+ const fields = fieldsOf2(entry[0], entry[1]);
3803
+ const weights = words.map((word2) => fields.reduce((best, [weight, known]) => known.some((one) => sameWord(word2, one)) ? Math.max(best, weight) : best, 0));
3804
+ const matched = weights.filter((weight) => weight > 0).length;
3805
+ const exact = normal(entry[0]) === named || (entry[1].aliases ?? []).some((alias) => normal(alias) === named);
3806
+ return { entry, matched, rank: (exact ? 1e3 : 0) + matched * 10 + weights.reduce((a, b) => a + b, 0) };
3807
+ }).filter(({ matched, rank }) => matched > 0 || rank >= 1e3).sort((a, b) => b.rank - a.rank || a.entry[0].localeCompare(b.entry[0])).map(({ entry }) => entry);
3716
3808
  }, "search");
3717
3809
  var nearest = /* @__PURE__ */ __name((commands, asked) => {
3718
3810
  const words = normal(asked).split(" ");