@wirecat/cli-core 0.734.0 → 0.735.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 +21 -0
- package/dist/ports/messenger.d.ts +9 -1
- package/dist/services/inbox.d.ts +1 -1
- package/dist/services/inbox.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
|
|
|
5
5
|
minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
|
|
6
6
|
shape of this file.
|
|
7
7
|
|
|
8
|
+
## 0.735.0 — 23.11.2026
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`unreadChats`, an optional messenger port for `inbox` and `review`.** A messenger whose chat list carries no
|
|
13
|
+
unread counts or last message times, because each costs a request (Slack), answers them here; `inbox`, `inbox --new`
|
|
14
|
+
and `review` use it when present, and every other command keeps the cheap `chats`. `hasMore` marks the answer
|
|
15
|
+
partial.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **`search conversations --like` shows the part of a huge conversation that answers the question.** A conversation of
|
|
20
|
+
more than 50 chunks holds text near any question, so its nearest chunk was often about something else. With a
|
|
21
|
+
made-up reply, such a hit now shows the chunk that ranks best by meaning (to the question and the reply together)
|
|
22
|
+
and by the words of both that are rare inside that conversation. Without `--like` nothing changes.
|
|
23
|
+
- **A usage error says how to fix the call.** An unknown flag that a sibling command takes names it
|
|
24
|
+
(`unknown option '--like' — --like is an option of search conversations`). `--filter` on `search messages` and
|
|
25
|
+
`search all` says the filter goes in the query. A query that fails after `--` quotes the words read as the query and
|
|
26
|
+
says to put options before `--`: an unknown option there (`messages list -- -100… --around 5419`) used to fail as
|
|
27
|
+
bare `query.invalid-syntax at position 2`.
|
|
28
|
+
|
|
8
29
|
## 0.734.0 — 23.11.2026
|
|
9
30
|
|
|
10
31
|
### Added
|
|
@@ -297,6 +297,14 @@ export interface TopicHistory {
|
|
|
297
297
|
before?: string;
|
|
298
298
|
}): Promise<Page<Message>>;
|
|
299
299
|
}
|
|
300
|
+
export interface UnreadChats {
|
|
301
|
+
/**
|
|
302
|
+
* The chats `inbox` and `review` look at, with `unreadCount`, `unreadMentions`, `muted` and `lastMessageAt` filled
|
|
303
|
+
* where `chats` leaves them out because each costs a request, as Slack's do. `chats` stays one cheap list for every
|
|
304
|
+
* other command. `hasMore` when it stopped short, so the answer says it may have missed one.
|
|
305
|
+
*/
|
|
306
|
+
unreadChats(): Promise<Page<Chat>>;
|
|
307
|
+
}
|
|
300
308
|
export interface ThreadReplies {
|
|
301
309
|
/**
|
|
302
310
|
* Replies `history` leaves out, such as Slack's thread replies: those sent after `since` (epoch milliseconds, left
|
|
@@ -733,7 +741,7 @@ export interface AccountHealth {
|
|
|
733
741
|
* be held to all of it. A method added from now on goes into a group, never the core, and returns a
|
|
734
742
|
* promise: the wrappers time and pass it through without being told about it (`throughWrapper`).
|
|
735
743
|
*/
|
|
736
|
-
export interface MessengerAdapter extends MessengerCore, Partial<MarkdownFormatting>, Partial<HtmlFormatting>, Partial<ServerReads>, Partial<PersonProfiles>, Partial<ChatReading>, Partial<SenderSearch>, Partial<MessageSearch>, Partial<MessageEditing>, Partial<MessagePins>, Partial<MessageStars>, Partial<MessageReactions>, Partial<ReadState>, Partial<TopicReadState>, Partial<MessagePolls>, Partial<MessageButtons>, Partial<BotChats>, Partial<ThreadAddressing>, Partial<TopicHistory>, Partial<ThreadReplies>, Partial<ForumControl>, Partial<TopicEditing>, Partial<LiveUpdates>, Partial<PassiveUpdates>, Partial<PushedHistory>, Partial<MessageMedia>, Partial<ScheduledMessages>, Partial<ScheduledChanges>, Partial<ChannelComments>, Partial<MessagePermalinks>, Partial<SenderIdentities>, Partial<GroupModeration>, Partial<AccountTools>, Partial<ProfilePhotos>, Partial<GroupAdmin>, Partial<JoinRequests>, Partial<InviteLinks>, Partial<ChatFolders>, Partial<ContactBook>, Partial<AccountEditing>, Partial<AccountRecords>, Partial<AccountSettings>, Partial<ChatDeletion>, Partial<AccountHealth>, Partial<OfficialStats> {
|
|
744
|
+
export interface MessengerAdapter extends MessengerCore, Partial<MarkdownFormatting>, Partial<HtmlFormatting>, Partial<ServerReads>, Partial<PersonProfiles>, Partial<ChatReading>, Partial<SenderSearch>, Partial<MessageSearch>, Partial<MessageEditing>, Partial<MessagePins>, Partial<MessageStars>, Partial<MessageReactions>, Partial<ReadState>, Partial<TopicReadState>, Partial<MessagePolls>, Partial<MessageButtons>, Partial<BotChats>, Partial<ThreadAddressing>, Partial<TopicHistory>, Partial<ThreadReplies>, Partial<UnreadChats>, Partial<ForumControl>, Partial<TopicEditing>, Partial<LiveUpdates>, Partial<PassiveUpdates>, Partial<PushedHistory>, Partial<MessageMedia>, Partial<ScheduledMessages>, Partial<ScheduledChanges>, Partial<ChannelComments>, Partial<MessagePermalinks>, Partial<SenderIdentities>, Partial<GroupModeration>, Partial<AccountTools>, Partial<ProfilePhotos>, Partial<GroupAdmin>, Partial<JoinRequests>, Partial<InviteLinks>, Partial<ChatFolders>, Partial<ContactBook>, Partial<AccountEditing>, Partial<AccountRecords>, Partial<AccountSettings>, Partial<ChatDeletion>, Partial<AccountHealth>, Partial<OfficialStats> {
|
|
737
745
|
}
|
|
738
746
|
type Method = (...args: never[]) => unknown;
|
|
739
747
|
/**
|
package/dist/services/inbox.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const heard: (chats: Chat[], all: boolean) => {
|
|
|
17
17
|
quiet: number;
|
|
18
18
|
};
|
|
19
19
|
/** What `inbox` and `review` read: the messenger's own answers, or the local store's in store mode. */
|
|
20
|
-
export type InboxReader = Pick<ServerReads, "chats" | "history"> & Pick<MessengerAdapter, "resolve" | "admins">;
|
|
20
|
+
export type InboxReader = Pick<ServerReads, "chats" | "history"> & Pick<MessengerAdapter, "resolve" | "admins" | "unreadChats">;
|
|
21
21
|
/**
|
|
22
22
|
* The stored chats and messages, read as the messenger would answer. Saving a message does not move
|
|
23
23
|
* its chat's last message time, so the newest stored message does — a chat that only `watch` heard
|
package/dist/services/inbox.js
CHANGED
|
@@ -27,7 +27,7 @@ export const heard = (chats, all) => all
|
|
|
27
27
|
* typed title; MAX answers from the chats its login sent. `hasMore` is the messenger saying it could
|
|
28
28
|
* not list them all.
|
|
29
29
|
*/
|
|
30
|
-
const everyChat = (adapter) => adapter.chats({ offset: 0 });
|
|
30
|
+
const everyChat = (adapter) => (adapter.unreadChats ? adapter.unreadChats() : adapter.chats({ offset: 0 }));
|
|
31
31
|
/**
|
|
32
32
|
* The stored chats and messages, read as the messenger would answer. Saving a message does not move
|
|
33
33
|
* its chat's last message time, so the newest stored message does — a chat that only `watch` heard
|
|
@@ -242,6 +242,7 @@ export const inboxService = (deps) => {
|
|
|
242
242
|
history: capability(connection, "history", "read a chat's history"),
|
|
243
243
|
resolve: (reference) => connection.resolve(reference),
|
|
244
244
|
...(connection.admins ? { admins: capability(connection, "admins", "list a chat's admins") } : {}),
|
|
245
|
+
...(connection.unreadChats ? { unreadChats: capability(connection, "unreadChats", "count unread chats") } : {}),
|
|
245
246
|
};
|
|
246
247
|
};
|
|
247
248
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.735.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",
|