@wirecat/cli-template 0.15.0 → 0.16.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 (149) hide show
  1. package/.github/workflows/ci.yml +17 -0
  2. package/AGENTS.md +56 -2
  3. package/CHANGELOG.md +36 -0
  4. package/README.md +12 -4
  5. package/biome.json +2 -2
  6. package/contracts/mcp-tools.json +2 -2
  7. package/dist/bin/clidev.js +2 -2
  8. package/dist/bundle/{chunk-LU4A2T7Y.js → all-profiles-FS7AEOE7.js} +8 -5
  9. package/dist/bundle/{anthropic-ICTW7CNQ.js → anthropic-5RN7BGDI.js} +3 -3
  10. package/dist/bundle/{app-server-OW5LT5XV.js → app-server-WGTKZQKJ.js} +28 -29
  11. package/dist/bundle/{bun-sqlite-JE6FJFQT.js → bun-sqlite-WK2IGBGD.js} +2 -2
  12. package/dist/bundle/{chunk-AS2PJNQ2.js → chunk-2MWNE4L3.js} +1 -1
  13. package/dist/bundle/{chunk-2DAXUNTS.js → chunk-5HHIPDNW.js} +1 -1
  14. package/dist/bundle/{chunk-YOJLIVGO.js → chunk-5KAYQKBK.js} +1 -1
  15. package/dist/bundle/{chunk-62JRF2JA.js → chunk-6WOJIAYA.js} +1 -1
  16. package/dist/bundle/chunk-7EUX7AZV.js +141 -0
  17. package/dist/bundle/{chunk-7F5VMLVK.js → chunk-ADFSSIV4.js} +1 -1
  18. package/dist/bundle/{chunk-U6QD3J3F.js → chunk-ATHZEV2Z.js} +2 -2
  19. package/dist/bundle/{chunk-7UPBPE3Z.js → chunk-BPMKAZSS.js} +8 -8
  20. package/dist/bundle/{chunk-DZLHY4IA.js → chunk-C3GNOEJP.js} +1 -1
  21. package/dist/bundle/{chunk-PIJUGF5F.js → chunk-CTBHQRX6.js} +1 -1
  22. package/dist/bundle/{chunk-LFLSV353.js → chunk-DEHBTFIC.js} +1 -1
  23. package/dist/bundle/{chunk-NVNUUHT5.js → chunk-EA3TMI4A.js} +8 -8
  24. package/dist/bundle/{chunk-5GTMQTQH.js → chunk-EILS4BTQ.js} +16 -18
  25. package/dist/bundle/{chunk-EX2FV7YJ.js → chunk-ENDBOYQR.js} +14 -14
  26. package/dist/bundle/{chunk-6AW4DDK4.js → chunk-ETJXPB6A.js} +1 -1
  27. package/dist/bundle/{chunk-LATYBJ4T.js → chunk-FMO6F5Q2.js} +1 -1
  28. package/dist/bundle/{chunk-VVGPAHUN.js → chunk-HTYLT6ME.js} +23 -7
  29. package/dist/bundle/{chunk-F34HGYWF.js → chunk-JFXWLQ2L.js} +1 -1
  30. package/dist/bundle/{chunk-KLFYY7KC.js → chunk-JJZCPBH3.js} +6 -6
  31. package/dist/bundle/{chunk-G7W53MQP.js → chunk-LRHX62ZF.js} +2 -2
  32. package/dist/bundle/{chunk-SOYOOU2D.js → chunk-MBBOINK4.js} +2 -2
  33. package/dist/bundle/{chunk-NRZV7K4M.js → chunk-MEXT6XDP.js} +2 -2
  34. package/dist/bundle/{chunk-R2JKPHH5.js → chunk-NVPWZF67.js} +1 -1
  35. package/dist/bundle/{chunk-45244QQ6.js → chunk-OF56L2JU.js} +2 -2
  36. package/dist/bundle/{chunk-4MU2UM4C.js → chunk-OGTRPW2K.js} +3 -3
  37. package/dist/bundle/{chunk-VXOR76ZL.js → chunk-ORV4EGNC.js} +1 -1
  38. package/dist/bundle/{chunk-TJJ2XSJP.js → chunk-QGOOPPEW.js} +2 -2
  39. package/dist/bundle/{chunk-NH6LZ3H3.js → chunk-RFJKNFVF.js} +3 -3
  40. package/dist/bundle/{chunk-R5RYPD23.js → chunk-RYOAQCVJ.js} +1 -1
  41. package/dist/bundle/{chunk-66VMJGV6.js → chunk-SKBRW5U3.js} +1 -1
  42. package/dist/bundle/{chunk-NG7MOJBT.js → chunk-TXHCL75B.js} +43 -6
  43. package/dist/bundle/{chunk-FC53WQHG.js → chunk-VPCXYY46.js} +1 -1
  44. package/dist/bundle/{chunk-IOJ2DTCY.js → chunk-WDWP5N6M.js} +2 -0
  45. package/dist/bundle/{chunk-NVGOHYTE.js → chunk-WM5AMTRY.js} +4 -4
  46. package/dist/bundle/{chunk-MWUHBEDN.js → chunk-YNROUY3R.js} +10 -10
  47. package/dist/bundle/{chunk-DQIBGCF3.js → chunk-Z5NL6YNU.js} +2 -2
  48. package/dist/bundle/{chunk-GHF72SHT.js → chunk-ZSY4WAGI.js} +28 -21
  49. package/dist/bundle/clidev.js +3 -3
  50. package/dist/bundle/{command-contract-3MPKXBVL.js → command-contract-ZDU73EPH.js} +9 -9
  51. package/dist/bundle/{decode-NXB5UKMO.js → decode-QMLOGZ6R.js} +2 -2
  52. package/dist/bundle/{embed-IKZ24BMC.js → embed-PIR2LJR2.js} +4 -4
  53. package/dist/bundle/{embedder-GMQ24DOQ.js → embedder-6KBRPAEQ.js} +4 -4
  54. package/dist/bundle/{first-run-PURIGDLD.js → first-run-JO3CMY3Z.js} +7 -7
  55. package/dist/bundle/{first-screen-B2CF2CET.js → first-screen-3T5IXTFL.js} +10 -10
  56. package/dist/bundle/{node-sqlite-73Z4SFOA.js → node-sqlite-LIK6OYNF.js} +2 -2
  57. package/dist/bundle/{oauth-EVTPAMZP.js → oauth-7FVF7HQQ.js} +4 -4
  58. package/dist/bundle/{open-46WZAPJ3.js → open-CRZDEATN.js} +2 -2
  59. package/dist/bundle/{openai-GWRDAHDU.js → openai-WAJ6WREQ.js} +11 -32
  60. package/dist/bundle/{program-37NVH5YJ.js → program-ZFFFPBRS.js} +2251 -291
  61. package/dist/bundle/{prompt-IVEYRLS5.js → prompt-QQIVHO3M.js} +3 -3
  62. package/dist/bundle/{recognize-WVEKHODM.js → recognize-4KLBZDEC.js} +2 -2
  63. package/dist/bundle/{remote-4K5VPMC7.js → remote-BABMZTHA.js} +5 -5
  64. package/dist/bundle/{rerank-V24UJZYJ.js → rerank-P3IQQJIL.js} +4 -4
  65. package/dist/bundle/{chunk-EMHCXXNJ.js → serve-25SSAKRZ.js} +6 -4
  66. package/dist/bundle/server-G4GCDMYI.js +52 -0
  67. package/dist/bundle/{chunk-KJ3UADR3.js → server-P4XUYY5A.js} +27 -7
  68. package/dist/bundle/{state-ZPYGECVP.js → state-QCQALQBJ.js} +3 -3
  69. package/dist/bundle/{store-6JQCLPQF.js → store-ZECPRGGH.js} +7 -7
  70. package/dist/bundle/store-maintenance-command-ECUO5G6L.js +42 -0
  71. package/dist/commands/comments.d.ts +3 -0
  72. package/dist/commands/comments.d.ts.map +1 -0
  73. package/dist/commands/comments.js +114 -0
  74. package/dist/commands/comments.js.map +1 -0
  75. package/dist/commands/session.d.ts +3 -0
  76. package/dist/commands/session.d.ts.map +1 -0
  77. package/dist/commands/session.js +96 -0
  78. package/dist/commands/session.js.map +1 -0
  79. package/dist/context.d.ts +83 -0
  80. package/dist/context.d.ts.map +1 -0
  81. package/dist/context.js +58 -0
  82. package/dist/context.js.map +1 -0
  83. package/dist/program.d.ts.map +1 -1
  84. package/dist/program.js +24 -4
  85. package/dist/program.js.map +1 -1
  86. package/dist/sample/comments.d.ts +61 -0
  87. package/dist/sample/comments.d.ts.map +1 -0
  88. package/dist/sample/comments.js +39 -0
  89. package/dist/sample/comments.js.map +1 -0
  90. package/dist/sample/transport.d.ts +42 -0
  91. package/dist/sample/transport.d.ts.map +1 -0
  92. package/dist/sample/transport.js +152 -0
  93. package/dist/sample/transport.js.map +1 -0
  94. package/dist/token.d.ts +16 -0
  95. package/dist/token.d.ts.map +1 -0
  96. package/dist/token.js +32 -0
  97. package/dist/token.js.map +1 -0
  98. package/dist/version.d.ts +1 -1
  99. package/dist/version.js +1 -1
  100. package/docs/commands.md +234 -12
  101. package/docs/configuration.md +1 -1
  102. package/docs/dev/reference-clis.md +3 -2
  103. package/docs/dev/test-matrix.md +36 -5
  104. package/docs/index.md +4 -3
  105. package/docs/security.md +4 -2
  106. package/kit/dist/new.js +6 -3
  107. package/lint/overrides.json +9 -1
  108. package/package.json +3 -4
  109. package/scripts/test-matrix-untested.ts +19 -0
  110. package/skills/clidev-cli/SKILL.md +1 -1
  111. package/src/commands/comments.ts +167 -0
  112. package/src/commands/session.ts +144 -0
  113. package/src/comments.test.ts +258 -0
  114. package/src/context.ts +78 -0
  115. package/src/mcp.test.ts +71 -76
  116. package/src/program.test.ts +9 -16
  117. package/src/program.ts +28 -4
  118. package/src/sample/comments.ts +51 -0
  119. package/src/sample/transport.test.ts +117 -0
  120. package/src/sample/transport.ts +184 -0
  121. package/src/testing/fake-comments.ts +167 -0
  122. package/src/testing/harness.ts +51 -0
  123. package/src/token.ts +42 -0
  124. package/src/version.ts +1 -1
  125. package/dist/bundle/all-profiles-NVB2HT2S.js +0 -24
  126. package/dist/bundle/chunk-GUFPQZUA.js +0 -48
  127. package/dist/bundle/chunk-NL2DQPT7.js +0 -2
  128. package/dist/bundle/mcp-ASNYBQ5B.js +0 -152
  129. package/dist/bundle/mcp-EY2NUYDQ.js +0 -82
  130. package/dist/bundle/serve-PJWSOV7F.js +0 -19
  131. package/dist/bundle/server-3TPCEZ6P.js +0 -40
  132. package/dist/bundle/server-GQX5MZTT.js +0 -53
  133. package/dist/bundle/store-maintenance-command-ND4ADMGC.js +0 -42
  134. package/dist/commands/doctor.d.ts +0 -77
  135. package/dist/commands/doctor.d.ts.map +0 -1
  136. package/dist/commands/doctor.js +0 -74
  137. package/dist/commands/doctor.js.map +0 -1
  138. package/dist/commands/mcp.d.ts +0 -3
  139. package/dist/commands/mcp.d.ts.map +0 -1
  140. package/dist/commands/mcp.js +0 -97
  141. package/dist/commands/mcp.js.map +0 -1
  142. package/dist/mcp.d.ts +0 -29
  143. package/dist/mcp.d.ts.map +0 -1
  144. package/dist/mcp.js +0 -98
  145. package/dist/mcp.js.map +0 -1
  146. package/src/commands/doctor.ts +0 -86
  147. package/src/commands/mcp.ts +0 -130
  148. package/src/mcp-http.test.ts +0 -172
  149. package/src/mcp.ts +0 -140
@@ -10,7 +10,7 @@ import {
10
10
  optional,
11
11
  pipe,
12
12
  safeParse
13
- } from "./chunk-IOJ2DTCY.js";
13
+ } from "./chunk-WDWP5N6M.js";
14
14
  import {
15
15
  __name
16
16
  } from "./chunk-ZVVMGPBJ.js";
@@ -8,7 +8,7 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-6AW4DDK4.js";
11
+ } from "./chunk-ETJXPB6A.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
@@ -7,7 +7,7 @@ import {
7
7
  refuseLocalWrite,
8
8
  refuseUnknownPermissionKeys,
9
9
  sendsPathFor
10
- } from "./chunk-KLFYY7KC.js";
10
+ } from "./chunk-JJZCPBH3.js";
11
11
  import {
12
12
  MAX_SEARCH_OFFSET,
13
13
  chatRef,
@@ -17,10 +17,10 @@ import {
17
17
  positiveCount,
18
18
  refreshedFiles,
19
19
  senderIsMe
20
- } from "./chunk-GHF72SHT.js";
20
+ } from "./chunk-ZSY4WAGI.js";
21
21
  import {
22
22
  commandPathOf
23
- } from "./chunk-NRZV7K4M.js";
23
+ } from "./chunk-MEXT6XDP.js";
24
24
  import {
25
25
  CEILING_KEY,
26
26
  DEFAULT_TEXT_MODEL,
@@ -40,13 +40,13 @@ import {
40
40
  recalledAccount,
41
41
  settingsFor,
42
42
  writeOfKey
43
- } from "./chunk-VVGPAHUN.js";
43
+ } from "./chunk-HTYLT6ME.js";
44
44
  import {
45
45
  formatLocator,
46
46
  hitFiles,
47
47
  openStore,
48
48
  parseLocator
49
- } from "./chunk-NVNUUHT5.js";
49
+ } from "./chunk-EA3TMI4A.js";
50
50
  import {
51
51
  CliError,
52
52
  description,
@@ -57,7 +57,7 @@ import {
57
57
  toStandardJsonSchema,
58
58
  visibleControls,
59
59
  writes
60
- } from "./chunk-IOJ2DTCY.js";
60
+ } from "./chunk-WDWP5N6M.js";
61
61
  import {
62
62
  importFrom
63
63
  } from "./chunk-Y5E2WNWB.js";
@@ -257,6 +257,40 @@ var refuseByCommandPermissions = /* @__PURE__ */ __name((action, permissions, {
257
257
  });
258
258
  }, "refuseByCommandPermissions");
259
259
 
260
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/http/public-url.js
261
+ var EXAMPLE = "--public-url https://<name>.ts.net";
262
+ var publicUrlOf = /* @__PURE__ */ __name((given, { missing, reaches, path = false }) => {
263
+ if (!given)
264
+ throw new CliError("configuration_error", `${missing} needs the tunnel's address: ${EXAMPLE}`);
265
+ let url;
266
+ try {
267
+ url = new URL(given);
268
+ } catch {
269
+ throw new CliError("validation_error", `--public-url is not an address: ${EXAMPLE}`);
270
+ }
271
+ if (url.username || url.password)
272
+ throw new CliError("validation_error", "--public-url must not contain login credentials");
273
+ const local = url.protocol === "http:" && ["localhost", "127.0.0.1"].includes(url.hostname);
274
+ if (url.protocol !== "https:" && !local)
275
+ throw new CliError("validation_error", `--public-url must be https \u2014 ${reaches} through it`);
276
+ if (url.search || url.hash || !path && url.pathname !== "/")
277
+ throw new CliError("validation_error", path ? `--public-url is the tunnel's address, or a path of it, without a query: ${EXAMPLE}/tg` : `--public-url is the tunnel's address only, without a path: ${EXAMPLE}`);
278
+ if (path && !/^(\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*\/?$/.test(url.pathname))
279
+ throw new CliError("validation_error", "--public-url's path takes letters, digits, dot, dash and underscore: /tg");
280
+ if (path)
281
+ url.pathname = url.pathname.replace(/\/+$/, "") || "/";
282
+ return url;
283
+ }, "publicUrlOf");
284
+ var portOf = /* @__PURE__ */ __name((given, fallback) => {
285
+ if (given === void 0)
286
+ return fallback;
287
+ const port = Number(given);
288
+ if (!Number.isInteger(port) || port < 1 || port > 65535)
289
+ throw new CliError("validation_error", "--port takes 1\u201365535");
290
+ return port;
291
+ }, "portOf");
292
+ var mcpUrlOf = /* @__PURE__ */ __name((publicUrl) => new URL(`${publicUrl.pathname.replace(/\/+$/, "")}/mcp`, publicUrl.origin), "mcpUrlOf");
293
+
260
294
  // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/cli/messenger/search-sync-options.js
261
295
  var syncsFirst = /* @__PURE__ */ __name((messenger) => messenger.history !== "store", "syncsFirst");
262
296
  var syncOptions = /* @__PURE__ */ __name((command, messenger) => {
@@ -1198,6 +1232,9 @@ export {
1198
1232
  registerPrompts,
1199
1233
  refuseWriteBeforeConnecting,
1200
1234
  refuseByCommandPermissions,
1235
+ publicUrlOf,
1236
+ portOf,
1237
+ mcpUrlOf,
1201
1238
  syncsFirst,
1202
1239
  syncOptions,
1203
1240
  syncRequest,
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
 
4
4
  // dist/version.js
5
- var VERSION = "0.15.0";
5
+ var VERSION = "0.16.0";
6
6
 
7
7
  // dist/identity.js
8
8
  var PACKAGE = "@wirecat/clidev-cli";
@@ -4755,6 +4755,7 @@ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, re
4755
4755
  reject(abortError());
4756
4756
  }, { once: true });
4757
4757
  }), "realSleep");
4758
+ var wallClock = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "wallClock");
4758
4759
 
4759
4760
  // 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/logging.js
4760
4761
  import { appendFileSync } from "node:fs";
@@ -5198,6 +5199,7 @@ export {
5198
5199
  configFilePath,
5199
5200
  Credentials,
5200
5201
  realSleep,
5202
+ wallClock,
5201
5203
  defineLogEvents,
5202
5204
  isContentKey,
5203
5205
  traceIdOf,
@@ -5,7 +5,7 @@ import {
5
5
  isNewer,
6
6
  readNoticeState,
7
7
  writeUpdateState
8
- } from "./chunk-AS2PJNQ2.js";
8
+ } from "./chunk-2MWNE4L3.js";
9
9
  import {
10
10
  executableEnvironment,
11
11
  executableOnPath,
@@ -24,12 +24,12 @@ import {
24
24
  keyForCommand,
25
25
  levelFor,
26
26
  readKeysForCommand
27
- } from "./chunk-VVGPAHUN.js";
27
+ } from "./chunk-HTYLT6ME.js";
28
28
  import {
29
29
  MEETING_QUERY,
30
30
  QUERY_REASONS,
31
31
  meetingProjectEvidence
32
- } from "./chunk-YOJLIVGO.js";
32
+ } from "./chunk-5KAYQKBK.js";
33
33
  import {
34
34
  CliError,
35
35
  defineReasons,
@@ -39,7 +39,7 @@ import {
39
39
  union,
40
40
  visibleControls,
41
41
  writes
42
- } from "./chunk-IOJ2DTCY.js";
42
+ } from "./chunk-WDWP5N6M.js";
43
43
  import {
44
44
  __name,
45
45
  __toESM
@@ -3,23 +3,23 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  installerOf,
5
5
  updateCommand
6
- } from "./chunk-AS2PJNQ2.js";
6
+ } from "./chunk-2MWNE4L3.js";
7
7
  import {
8
8
  QUESTIONS,
9
9
  readSetupAnswers,
10
10
  unanswered,
11
11
  writeSetupAnswers
12
- } from "./chunk-U6QD3J3F.js";
12
+ } from "./chunk-ATHZEV2Z.js";
13
13
  import {
14
14
  DEFAULT_STEMMERS,
15
15
  LANGUAGES
16
- } from "./chunk-R2JKPHH5.js";
16
+ } from "./chunk-NVPWZF67.js";
17
17
  import {
18
18
  sharedConfigPath
19
- } from "./chunk-TJJ2XSJP.js";
19
+ } from "./chunk-QGOOPPEW.js";
20
20
  import {
21
21
  storePath
22
- } from "./chunk-62JRF2JA.js";
22
+ } from "./chunk-6WOJIAYA.js";
23
23
  import {
24
24
  __name
25
25
  } from "./chunk-ZVVMGPBJ.js";
@@ -82,7 +82,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
82
82
  return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
83
83
  }, "suggested");
84
84
  var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
85
- const { openStore } = await import("./store-6JQCLPQF.js");
85
+ const { openStore } = await import("./store-ZECPRGGH.js");
86
86
  const store = await openStore({ env });
87
87
  let rebuild = false;
88
88
  try {
@@ -111,8 +111,8 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
111
111
  if (!rebuild)
112
112
  return;
113
113
  const [{ openCache }, { buildStems }] = await Promise.all([
114
- import("./open-46WZAPJ3.js"),
115
- import("./store-maintenance-command-ND4ADMGC.js")
114
+ import("./open-CRZDEATN.js"),
115
+ import("./store-maintenance-command-ECUO5G6L.js")
116
116
  ]);
117
117
  const database = await openCache(storePath(env));
118
118
  try {
@@ -124,7 +124,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
124
124
  var askTools = /* @__PURE__ */ __name(async (run) => {
125
125
  const { command, env, io } = run;
126
126
  const installed = run.installed ?? ((name) => onPath(name, env));
127
- const { WIRECAT_TOOLS } = await import("./first-screen-B2CF2CET.js");
127
+ const { WIRECAT_TOOLS } = await import("./first-screen-3T5IXTFL.js");
128
128
  const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
129
129
  const missing = others.filter((tool) => !installed(tool.command));
130
130
  io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
@@ -197,7 +197,7 @@ var setupAtStart = /* @__PURE__ */ __name(async (start) => {
197
197
  contentLanguages: start.contentLanguages,
198
198
  all: start.path[0] === "setup",
199
199
  io: {
200
- ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-IVEYRLS5.js")).readSecret(prompt, { input, echo: true }), "ask"),
200
+ ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-QQIVHO3M.js")).readSecret(prompt, { input, echo: true }), "ask"),
201
201
  say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
202
202
  `), "say")
203
203
  }
@@ -5,10 +5,10 @@ import {
5
5
  installFiles,
6
6
  megabytes,
7
7
  sharedModelsDirectory
8
- } from "./chunk-45244QQ6.js";
8
+ } from "./chunk-OF56L2JU.js";
9
9
  import {
10
10
  CliError
11
- } from "./chunk-IOJ2DTCY.js";
11
+ } from "./chunk-WDWP5N6M.js";
12
12
  import {
13
13
  importFrom
14
14
  } from "./chunk-Y5E2WNWB.js";
@@ -8,17 +8,17 @@ import {
8
8
  sameOrdinaryFile,
9
9
  syncDirectory,
10
10
  writeFileAtomic
11
- } from "./chunk-PIJUGF5F.js";
11
+ } from "./chunk-CTBHQRX6.js";
12
12
  import {
13
13
  isNewer,
14
14
  updateCommand
15
- } from "./chunk-AS2PJNQ2.js";
15
+ } from "./chunk-2MWNE4L3.js";
16
16
  import {
17
17
  remoteKey
18
- } from "./chunk-SOYOOU2D.js";
18
+ } from "./chunk-MBBOINK4.js";
19
19
  import {
20
20
  MAX_MODEL_IMAGE_BYTES
21
- } from "./chunk-LATYBJ4T.js";
21
+ } from "./chunk-FMO6F5Q2.js";
22
22
  import {
23
23
  Command,
24
24
  DEFAULT_IMAGE_MODEL,
@@ -59,10 +59,10 @@ import {
59
59
  typedCommand,
60
60
  vectorModelKey,
61
61
  withAttempt
62
- } from "./chunk-VVGPAHUN.js";
62
+ } from "./chunk-HTYLT6ME.js";
63
63
  import {
64
64
  isCliFailure
65
- } from "./chunk-VXOR76ZL.js";
65
+ } from "./chunk-ORV4EGNC.js";
66
66
  import {
67
67
  AGENDA_COLUMNS,
68
68
  CHAT_COLUMNS,
@@ -145,13 +145,13 @@ import {
145
145
  validateAst,
146
146
  validateFields,
147
147
  withoutField
148
- } from "./chunk-NVNUUHT5.js";
148
+ } from "./chunk-EA3TMI4A.js";
149
149
  import {
150
150
  DEFAULT_STEMMERS,
151
151
  createStemmer,
152
152
  fold,
153
153
  normalize
154
- } from "./chunk-R2JKPHH5.js";
154
+ } from "./chunk-NVPWZF67.js";
155
155
  import {
156
156
  EVENT_QUERY,
157
157
  MEETING_PROJECT_EVIDENCE_QUERY,
@@ -196,11 +196,11 @@ import {
196
196
  validateQuery,
197
197
  walkQuery,
198
198
  zonedMoment
199
- } from "./chunk-YOJLIVGO.js";
199
+ } from "./chunk-5KAYQKBK.js";
200
200
  import {
201
201
  DEFAULT_TASK_CATEGORIES,
202
202
  FALLBACK_CATEGORY
203
- } from "./chunk-TJJ2XSJP.js";
203
+ } from "./chunk-QGOOPPEW.js";
204
204
  import {
205
205
  Unzip,
206
206
  UnzipInflate,
@@ -211,15 +211,15 @@ import {
211
211
  placedText,
212
212
  runEmbedders,
213
213
  textModelsDirectory
214
- } from "./chunk-DQIBGCF3.js";
214
+ } from "./chunk-Z5NL6YNU.js";
215
215
  import {
216
216
  installFiles,
217
217
  megabytes
218
- } from "./chunk-45244QQ6.js";
218
+ } from "./chunk-OF56L2JU.js";
219
219
  import {
220
220
  storePath,
221
221
  wirecatDirectory
222
- } from "./chunk-62JRF2JA.js";
222
+ } from "./chunk-6WOJIAYA.js";
223
223
  import {
224
224
  CliError,
225
225
  array,
@@ -248,7 +248,7 @@ import {
248
248
  unknown,
249
249
  visibleControls,
250
250
  writeSecurely
251
- } from "./chunk-IOJ2DTCY.js";
251
+ } from "./chunk-WDWP5N6M.js";
252
252
  import {
253
253
  importFrom,
254
254
  resolveFrom
@@ -17412,6 +17412,12 @@ var unfilteredQuery = /* @__PURE__ */ __name((entity, schema2) => ({
17412
17412
  backend: "native",
17413
17413
  fields: queryFieldsOf(schema2, {})
17414
17414
  }), "unfilteredQuery");
17415
+ var commandPath = /* @__PURE__ */ __name((command) => {
17416
+ const words3 = [];
17417
+ for (let at = command; at?.parent; at = at.parent)
17418
+ words3.unshift(at.name());
17419
+ return words3.join(" ");
17420
+ }, "commandPath");
17415
17421
  var withTomorrow = /* @__PURE__ */ __name((query, registry, zone = timezoneOf(), now = Date.now()) => {
17416
17422
  const times = new Set(registry.fields.filter(({ type }) => type === "time").map(({ name }) => name));
17417
17423
  const date2 = /* @__PURE__ */ new Date(`${new Intl.DateTimeFormat("en-CA", { timeZone: zone }).format(now)}T00:00:00Z`);
@@ -18819,7 +18825,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
18819
18825
  price: remote.price,
18820
18826
  installed: true,
18821
18827
  perBatch: PER_REQUEST * concurrency,
18822
- open: /* @__PURE__ */ __name(async () => (await import("./remote-4K5VPMC7.js")).openRemote(remote, apiKey, { concurrency }), "open")
18828
+ open: /* @__PURE__ */ __name(async () => (await import("./remote-BABMZTHA.js")).openRemote(remote, apiKey, { concurrency }), "open")
18823
18829
  };
18824
18830
  }
18825
18831
  const model = textModel(choice);
@@ -24937,7 +24943,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
24937
24943
  }
24938
24944
  await nativeRuntime({ env, progress });
24939
24945
  progress(`${model.id}: loading it once to check it works`);
24940
- const { openEmbedder: openEmbedder2 } = await import("./embed-IKZ24BMC.js");
24946
+ const { openEmbedder: openEmbedder2 } = await import("./embed-PIR2LJR2.js");
24941
24947
  const embedder = await openEmbedder2(model, directory2);
24942
24948
  try {
24943
24949
  const [vector] = await embedder.embed(["check"], "query");
@@ -24958,7 +24964,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
24958
24964
  }
24959
24965
  await nativeRuntime({ env, progress });
24960
24966
  progress(`${model.id}: loading it once to check it works`);
24961
- const { openReranker } = await import("./rerank-V24UJZYJ.js");
24967
+ const { openReranker } = await import("./rerank-P3IQQJIL.js");
24962
24968
  const reranker = await openReranker(model, directory2);
24963
24969
  try {
24964
24970
  await reranker.score("check", ["check"]);
@@ -24976,7 +24982,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
24976
24982
  await installFiles(placedImage(model, directory2), { progress });
24977
24983
  }
24978
24984
  progress(`${model.id}: loading it once to check it works`);
24979
- const { openPictureEmbedder } = await import("./embedder-GMQ24DOQ.js");
24985
+ const { openPictureEmbedder } = await import("./embedder-6KBRPAEQ.js");
24980
24986
  const embedder = await openPictureEmbedder(model, directory2);
24981
24987
  try {
24982
24988
  const vector = await embedder.embedQuery("check");
@@ -32849,7 +32855,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
32849
32855
  const directory2 = imageModelsDirectory(deps.env);
32850
32856
  if (!isImageModelInstalled(model2, directory2))
32851
32857
  throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
32852
- const { openPictureEmbedder } = await import("./embedder-GMQ24DOQ.js");
32858
+ const { openPictureEmbedder } = await import("./embedder-6KBRPAEQ.js");
32853
32859
  return openPictureEmbedder(model2, directory2);
32854
32860
  }, "open");
32855
32861
  const embedder = /* @__PURE__ */ __name(() => {
@@ -33128,7 +33134,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
33128
33134
  const warm = deps.embedders;
33129
33135
  const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-YIQPKLZI.js")).openRerankerProcess(model, directory2, {
33130
33136
  threads: defaultThreads()
33131
- })) : await (await import("./rerank-V24UJZYJ.js")).openReranker(model, directory2);
33137
+ })) : await (await import("./rerank-P3IQQJIL.js")).openReranker(model, directory2);
33132
33138
  return {
33133
33139
  model: model.id,
33134
33140
  score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
@@ -33154,7 +33160,7 @@ var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}
33154
33160
  const directory2 = imageModelsDirectory(env);
33155
33161
  if (!isImageModelInstalled(model, directory2))
33156
33162
  throw new CliError("not_found", `the picture model is not downloaded \u2014 ${command === void 0 ? "install it with a WireCat CLI that has `images models download` (tg, max or wa); they share the model folder" : `\`${command} images models download ${model.id}\` fetches it`}`, { reason: "model.not-downloaded", model: model.id });
33157
- const { openPictureEmbedder } = await import("./embedder-GMQ24DOQ.js");
33163
+ const { openPictureEmbedder } = await import("./embedder-6KBRPAEQ.js");
33158
33164
  return openPictureEmbedder(model, directory2);
33159
33165
  }, "openPictureEmbedderFor");
33160
33166
 
@@ -37066,6 +37072,7 @@ export {
37066
37072
  QUERY_ARGUMENT,
37067
37073
  withQuery,
37068
37074
  unfilteredQuery,
37075
+ commandPath,
37069
37076
  listQuery,
37070
37077
  typedQuery,
37071
37078
  pageOf,
@@ -3,10 +3,10 @@ import { createRequire as __bundleRequire } from "node:module";
3
3
  const require = __bundleRequire(import.meta.url);
4
4
  import {
5
5
  IDENTITY
6
- } from "./chunk-FC53WQHG.js";
6
+ } from "./chunk-VPCXYY46.js";
7
7
  import {
8
8
  catchCrashes
9
- } from "./chunk-IOJ2DTCY.js";
9
+ } from "./chunk-WDWP5N6M.js";
10
10
  import "./chunk-Y5E2WNWB.js";
11
11
  import "./chunk-ZVVMGPBJ.js";
12
12
 
@@ -14,7 +14,7 @@ import "./chunk-ZVVMGPBJ.js";
14
14
  import { enableCompileCache } from "node:module";
15
15
  enableCompileCache();
16
16
  var stopCatching = catchCrashes({ cli: IDENTITY.command, interactive: process.stdout.isTTY === true });
17
- var { run } = await import("./program-37NVH5YJ.js");
17
+ var { run } = await import("./program-ZFFFPBRS.js");
18
18
  try {
19
19
  process.exitCode = await run(process.argv.slice(2));
20
20
  } finally {
@@ -6,17 +6,17 @@ import {
6
6
  commandPathOf,
7
7
  findCommand,
8
8
  outputOf
9
- } from "./chunk-NRZV7K4M.js";
10
- import "./chunk-VVGPAHUN.js";
11
- import "./chunk-VXOR76ZL.js";
12
- import "./chunk-U6QD3J3F.js";
9
+ } from "./chunk-MEXT6XDP.js";
10
+ import "./chunk-HTYLT6ME.js";
11
+ import "./chunk-ORV4EGNC.js";
12
+ import "./chunk-ATHZEV2Z.js";
13
13
  import "./chunk-VOTEB3AN.js";
14
- import "./chunk-YOJLIVGO.js";
14
+ import "./chunk-5KAYQKBK.js";
15
15
  import "./chunk-3WDYHOAF.js";
16
- import "./chunk-TJJ2XSJP.js";
17
- import "./chunk-45244QQ6.js";
18
- import "./chunk-62JRF2JA.js";
19
- import "./chunk-IOJ2DTCY.js";
16
+ import "./chunk-QGOOPPEW.js";
17
+ import "./chunk-OF56L2JU.js";
18
+ import "./chunk-6WOJIAYA.js";
19
+ import "./chunk-WDWP5N6M.js";
20
20
  import "./chunk-Y5E2WNWB.js";
21
21
  import "./chunk-ZVVMGPBJ.js";
22
22
  export {
@@ -3,10 +3,10 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  SAMPLE_RATE,
5
5
  decodeOgg
6
- } from "./chunk-7F5VMLVK.js";
6
+ } from "./chunk-ADFSSIV4.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-IOJ2DTCY.js";
9
+ } from "./chunk-WDWP5N6M.js";
10
10
  import {
11
11
  importFrom
12
12
  } from "./chunk-Y5E2WNWB.js";
@@ -13,10 +13,10 @@ import {
13
13
  truncated,
14
14
  unit,
15
15
  warmEmbedders
16
- } from "./chunk-DQIBGCF3.js";
17
- import "./chunk-45244QQ6.js";
18
- import "./chunk-62JRF2JA.js";
19
- import "./chunk-IOJ2DTCY.js";
16
+ } from "./chunk-Z5NL6YNU.js";
17
+ import "./chunk-OF56L2JU.js";
18
+ import "./chunk-6WOJIAYA.js";
19
+ import "./chunk-WDWP5N6M.js";
20
20
  import "./chunk-Y5E2WNWB.js";
21
21
  import "./chunk-ZVVMGPBJ.js";
22
22
  export {
@@ -4,12 +4,12 @@ import {
4
4
  openSession,
5
5
  truncated,
6
6
  unit
7
- } from "./chunk-DQIBGCF3.js";
8
- import "./chunk-45244QQ6.js";
9
- import "./chunk-62JRF2JA.js";
7
+ } from "./chunk-Z5NL6YNU.js";
8
+ import "./chunk-OF56L2JU.js";
9
+ import "./chunk-6WOJIAYA.js";
10
10
  import {
11
11
  CliError
12
- } from "./chunk-IOJ2DTCY.js";
12
+ } from "./chunk-WDWP5N6M.js";
13
13
  import {
14
14
  importFrom
15
15
  } from "./chunk-Y5E2WNWB.js";
@@ -5,14 +5,14 @@ import {
5
5
  asksAtStart,
6
6
  setupAtStart,
7
7
  systemLanguage
8
- } from "./chunk-MWUHBEDN.js";
9
- import "./chunk-AS2PJNQ2.js";
8
+ } from "./chunk-YNROUY3R.js";
9
+ import "./chunk-2MWNE4L3.js";
10
10
  import "./chunk-7Z4HR6GO.js";
11
- import "./chunk-U6QD3J3F.js";
12
- import "./chunk-R2JKPHH5.js";
13
- import "./chunk-TJJ2XSJP.js";
14
- import "./chunk-62JRF2JA.js";
15
- import "./chunk-IOJ2DTCY.js";
11
+ import "./chunk-ATHZEV2Z.js";
12
+ import "./chunk-NVPWZF67.js";
13
+ import "./chunk-QGOOPPEW.js";
14
+ import "./chunk-6WOJIAYA.js";
15
+ import "./chunk-WDWP5N6M.js";
16
16
  import "./chunk-Y5E2WNWB.js";
17
17
  import "./chunk-ZVVMGPBJ.js";
18
18
  export {
@@ -4,19 +4,19 @@ import {
4
4
  WIRECAT_TOOLS,
5
5
  firstScreen,
6
6
  installHelp
7
- } from "./chunk-4MU2UM4C.js";
7
+ } from "./chunk-OGTRPW2K.js";
8
8
  import "./chunk-HTQTIKWP.js";
9
- import "./chunk-NRZV7K4M.js";
10
- import "./chunk-VVGPAHUN.js";
11
- import "./chunk-VXOR76ZL.js";
12
- import "./chunk-U6QD3J3F.js";
9
+ import "./chunk-MEXT6XDP.js";
10
+ import "./chunk-HTYLT6ME.js";
11
+ import "./chunk-ORV4EGNC.js";
12
+ import "./chunk-ATHZEV2Z.js";
13
13
  import "./chunk-VOTEB3AN.js";
14
- import "./chunk-YOJLIVGO.js";
14
+ import "./chunk-5KAYQKBK.js";
15
15
  import "./chunk-3WDYHOAF.js";
16
- import "./chunk-TJJ2XSJP.js";
17
- import "./chunk-45244QQ6.js";
18
- import "./chunk-62JRF2JA.js";
19
- import "./chunk-IOJ2DTCY.js";
16
+ import "./chunk-QGOOPPEW.js";
17
+ import "./chunk-OF56L2JU.js";
18
+ import "./chunk-6WOJIAYA.js";
19
+ import "./chunk-WDWP5N6M.js";
20
20
  import "./chunk-Y5E2WNWB.js";
21
21
  import "./chunk-ZVVMGPBJ.js";
22
22
  export {
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  loadVectorExtension,
5
5
  vectorExtension
6
- } from "./chunk-LFLSV353.js";
6
+ } from "./chunk-DEHBTFIC.js";
7
7
  import {
8
8
  TIME_LIMIT_FUNCTION,
9
9
  beforeTimeLimit
10
10
  } from "./chunk-3MDNAYQA.js";
11
- import "./chunk-IOJ2DTCY.js";
11
+ import "./chunk-WDWP5N6M.js";
12
12
  import "./chunk-Y5E2WNWB.js";
13
13
  import {
14
14
  __name
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  ownerLogin,
5
5
  revokeAll
6
- } from "./chunk-66VMJGV6.js";
6
+ } from "./chunk-SKBRW5U3.js";
7
7
  import "./chunk-5D4AEUVA.js";
8
- import "./chunk-6AW4DDK4.js";
9
- import "./chunk-DZLHY4IA.js";
8
+ import "./chunk-ETJXPB6A.js";
9
+ import "./chunk-C3GNOEJP.js";
10
10
  import "./chunk-VOTEB3AN.js";
11
- import "./chunk-IOJ2DTCY.js";
11
+ import "./chunk-WDWP5N6M.js";
12
12
  import "./chunk-Y5E2WNWB.js";
13
13
  import "./chunk-ZVVMGPBJ.js";
14
14
  export {
@@ -6,9 +6,9 @@ import {
6
6
  openCache,
7
7
  openFile,
8
8
  storeCapable
9
- } from "./chunk-NH6LZ3H3.js";
9
+ } from "./chunk-RFJKNFVF.js";
10
10
  import "./chunk-3MDNAYQA.js";
11
- import "./chunk-IOJ2DTCY.js";
11
+ import "./chunk-WDWP5N6M.js";
12
12
  import "./chunk-Y5E2WNWB.js";
13
13
  import "./chunk-ZVVMGPBJ.js";
14
14
  export {