@wirecat/cli-core 0.416.0 → 0.417.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ shape of this file.
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 0.417.0 — 25.10.2026
11
+
12
+ ### Fixed
13
+
14
+ - **`--discover` finds messages for a question that ends with "?".** When the question planner left a question as written ("Why did we drop Manchester?", «Почему поменяли цену?»), its "?" parsed as a one-character wildcard and discovery fell back to strict search, which found nothing. In discovery, a "?" after a word and before a space or the end is now punctuation. Strict search is unchanged.
15
+
10
16
  ## 0.416.0 — 25.10.2026
11
17
 
12
18
  ### Fixed
@@ -1,4 +1,4 @@
1
1
  import type { MessengerTraits } from "../ports/traits.js";
2
2
  import type { AccountKey, MessageStore } from "../store/store.js";
3
3
  import type { SearchFound, SearchQuery } from "./messages.js";
4
- export declare const searchDiscovery: (store: MessageStore, account: AccountKey, request: SearchQuery, messenger?: Partial<Pick<MessengerTraits, "savedChatId" | "app" | "history" | "provider">>) => Promise<SearchFound>;
4
+ export declare const searchDiscovery: (store: MessageStore, account: AccountKey, asked: SearchQuery, messenger?: Partial<Pick<MessengerTraits, "savedChatId" | "app" | "history" | "provider">>) => Promise<SearchFound>;
@@ -5,7 +5,11 @@ import { exhausted, QUERY_LIMITS } from "../search/lucene/types.js";
5
5
  import { planQuestion, words } from "../search/question-plan.js";
6
6
  import { searchCombined } from "./messages-combined.js";
7
7
  import { prepareLucene, searchLucene } from "./messages-search.js";
8
- export const searchDiscovery = async (store, account, request, messenger = {}) => {
8
+ export const searchDiscovery = async (store, account, asked, messenger = {}) => {
9
+ // A question's own "?" would parse as a one-character wildcard and send it to strict search (BUG-395).
10
+ const request = asked.ast !== undefined || asked.exact || !asked.text
11
+ ? asked
12
+ : { ...asked, text: asked.text.replace(/(?<=\p{L})\?(?=\s|$)/gu, "") };
9
13
  const original = await prepareLucene(store, account, request, messenger);
10
14
  const text = request.text ?? "";
11
15
  const plan = planQuestion(text, request.ast !== undefined || !!request.exact || !!request.newest);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-core",
3
- "version": "0.416.0",
3
+ "version": "0.417.0",
4
4
  "description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",