@wirecat/cli-core 0.410.0 → 0.412.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 +44 -0
- package/dist/cli/bot/command.js +4 -3
- package/dist/cli/bot/messages-sync.d.ts +7 -0
- package/dist/cli/bot/{store.js → messages-sync.js} +4 -5
- package/dist/cli/bot/port.d.ts +4 -4
- package/dist/cli/bot/setup.js +11 -5
- package/dist/cli/commands-command.js +18 -12
- package/dist/cli/config-command.js +1 -0
- package/dist/cli/contract-evidence.d.ts +26 -0
- package/dist/cli/contract-evidence.js +58 -0
- package/dist/cli/contract-templates.d.ts +4 -0
- package/dist/cli/contract-templates.js +83 -0
- package/dist/cli/discovery-descriptions.d.ts +4 -0
- package/dist/cli/discovery-descriptions.js +4 -0
- package/dist/cli/index.d.ts +21 -55
- package/dist/cli/index.js +18 -55
- package/dist/cli/messenger/chat-answers.d.ts +1 -1
- package/dist/cli/messenger/chat-answers.js +1 -1
- package/dist/cli/messenger/chat-lists.d.ts +1 -1
- package/dist/cli/messenger/chats-command.js +3 -0
- package/dist/cli/messenger/contacts-command.js +23 -15
- package/dist/cli/messenger/guard-commands.d.ts +5 -1
- package/dist/cli/messenger/guard-commands.js +5 -3
- package/dist/cli/messenger/messages-press-command.js +4 -1
- package/dist/cli/messenger/models-command.js +3 -11
- package/dist/cli/messenger/records-command.js +1 -1
- package/dist/cli/messenger/store-maintenance-command.d.ts +1 -1
- package/dist/cli/messenger/tasks-command.js +14 -4
- package/dist/cli/model-catalogue-command.d.ts +15 -0
- package/dist/cli/model-catalogue-command.js +110 -0
- package/dist/cli/moved.js +1 -0
- package/dist/cli/program.js +2 -0
- package/dist/cli/runs/search-command.js +2 -3
- package/dist/cli/runs/search-query.d.ts +1 -1
- package/dist/cli/runs/search-query.js +18 -2
- package/dist/cli/runs/search.d.ts +2 -1
- package/dist/cli/runs/search.js +4 -3
- package/dist/cli/settings.d.ts +2 -0
- package/dist/cli/settings.js +5 -1
- package/dist/cli/shared-command-exports.d.ts +644 -0
- package/dist/cli/shared-command-exports.js +114 -0
- package/dist/cli/shared-contracts.d.ts +1 -0
- package/dist/cli/shared-contracts.js +1 -0
- package/dist/domain/providers.d.ts +25 -3
- package/dist/domain/providers.js +89 -5
- package/dist/entities/chat.d.ts +3 -3
- package/dist/entities/chat.js +2 -2
- package/dist/entities/contact-context.d.ts +8 -8
- package/dist/entities/contact.d.ts +4 -4
- package/dist/entities/index.d.ts +40 -13
- package/dist/entities/index.js +5 -1
- package/dist/entities/knowledge-lists.d.ts +28 -0
- package/dist/entities/knowledge-lists.js +29 -0
- package/dist/entities/list-results.d.ts +1 -1
- package/dist/entities/list-results.js +1 -1
- package/dist/entities/send-attempt.d.ts +0 -1
- package/dist/entities/send-attempt.js +0 -1
- package/dist/errors/reasons.d.ts +1 -1
- package/dist/errors/reasons.js +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/meetings/cli/index.d.ts +1 -1
- package/dist/meetings/cli/index.js +25 -9
- package/dist/meetings/cli/passage.d.ts +0 -1
- package/dist/meetings/cli/passage.js +5 -3
- package/dist/meetings/cli/project-evidence.js +3 -2
- package/dist/meetings/cli/search.d.ts +2 -2
- package/dist/meetings/cli/search.js +9 -7
- package/dist/meetings/event-query.d.ts +1 -0
- package/dist/meetings/event-query.js +15 -0
- package/dist/meetings/index.d.ts +1 -0
- package/dist/meetings/index.js +1 -0
- package/dist/meetings/store.d.ts +2 -0
- package/dist/meetings/testing/memory.js +5 -0
- package/dist/search/account-list.d.ts +5 -2
- package/dist/search/account-list.js +27 -11
- package/dist/search/query.js +3 -1
- package/dist/sends/permission-aliases.js +1 -0
- package/dist/services/documents/knowledge.d.ts +5 -3
- package/dist/services/documents/knowledge.js +4 -4
- package/dist/services/meeting-links.d.ts +3 -1
- package/dist/services/meeting-links.js +2 -2
- package/dist/services/messages-search.js +15 -3
- package/dist/services/search-all.js +5 -2
- package/dist/services/tasks.d.ts +2 -0
- package/dist/services/tasks.js +6 -4
- package/dist/store/accounts.d.ts +3 -0
- package/dist/store/accounts.js +2 -0
- package/dist/store/exports.d.ts +1 -0
- package/dist/store/exports.js +1 -0
- package/dist/store/index.d.ts +3 -1
- package/dist/store/index.js +2 -0
- package/dist/store/knowledge-query.d.ts +6 -0
- package/dist/store/knowledge-query.js +34 -0
- package/dist/store/providers.d.ts +7 -0
- package/dist/store/providers.js +5 -0
- package/dist/store/sqlite/events.d.ts +2 -1
- package/dist/store/sqlite/events.js +16 -1
- package/dist/store/sqlite/knowledge.d.ts +5 -4
- package/dist/store/sqlite/knowledge.js +50 -17
- package/dist/store/sqlite/mail-rules.d.ts +2 -1
- package/dist/store/sqlite/mail-rules.js +12 -2
- package/dist/store/sqlite/meetings.js +3 -0
- package/dist/store/sqlite/notes.d.ts +11 -5
- package/dist/store/sqlite/notes.js +9 -2
- package/dist/store/sqlite/open-store.js +2 -0
- package/dist/store/sqlite/providers.d.ts +12 -0
- package/dist/store/sqlite/providers.js +45 -0
- package/dist/store/sqlite/tags.d.ts +1 -1
- package/dist/store/sqlite/tags.js +3 -3
- package/package.json +3 -3
- package/parity.json +92 -111
- package/dist/cli/bot/store.d.ts +0 -7
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ProviderEntry } from "../../domain/providers.js";
|
|
2
|
+
import type { CacheDatabase } from "../driver.js";
|
|
3
|
+
export declare const PROVIDERS_SETTING = "providers";
|
|
4
|
+
/** The entries as stored, unchecked: a newer CLI may have written a kind this build does not know. */
|
|
5
|
+
export declare const storedProvidersOf: (database: CacheDatabase) => unknown[];
|
|
6
|
+
/** Called on every open: the module state follows the store the process opened last. */
|
|
7
|
+
export declare const loadProviders: (database: CacheDatabase) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Writes `entry` over the stored one of its name and loads the result. Every run of every CLI calls it, so it
|
|
10
|
+
* writes only when the entry changed. Entries this build cannot read stay stored for the CLIs that can.
|
|
11
|
+
*/
|
|
12
|
+
export declare const registerProvider: (database: CacheDatabase, value: ProviderEntry, now: number) => void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { addProvider, providerEntryOf, useStoredProviders } from "../../domain/providers.js";
|
|
2
|
+
import { write } from "./transaction.js";
|
|
3
|
+
export const PROVIDERS_SETTING = "providers";
|
|
4
|
+
/** The entries as stored, unchecked: a newer CLI may have written a kind this build does not know. */
|
|
5
|
+
export const storedProvidersOf = (database) => {
|
|
6
|
+
const row = database.prepare("SELECT value FROM store_settings WHERE key = ?").get(PROVIDERS_SETTING);
|
|
7
|
+
if (!row)
|
|
8
|
+
return [];
|
|
9
|
+
try {
|
|
10
|
+
const value = JSON.parse(String(row.value));
|
|
11
|
+
return Array.isArray(value) ? value : [];
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
/** Called on every open: the module state follows the store the process opened last. */
|
|
18
|
+
export const loadProviders = (database) => {
|
|
19
|
+
useStoredProviders(storedProvidersOf(database));
|
|
20
|
+
};
|
|
21
|
+
const nameOf = (stored) => typeof stored === "object" && stored !== null ? stored.name : undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Writes `entry` over the stored one of its name and loads the result. Every run of every CLI calls it, so it
|
|
24
|
+
* writes only when the entry changed. Entries this build cannot read stay stored for the CLIs that can.
|
|
25
|
+
*/
|
|
26
|
+
export const registerProvider = (database, value, now) => {
|
|
27
|
+
const entry = providerEntryOf(value);
|
|
28
|
+
write(database, () => {
|
|
29
|
+
const stored = storedProvidersOf(database);
|
|
30
|
+
const others = stored.filter((one) => nameOf(one) !== entry.name);
|
|
31
|
+
try {
|
|
32
|
+
useStoredProviders(others);
|
|
33
|
+
addProvider(entry);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
useStoredProviders(stored);
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
if (stored.some((one) => JSON.stringify(one) === JSON.stringify(entry)))
|
|
40
|
+
return;
|
|
41
|
+
database
|
|
42
|
+
.prepare("INSERT OR REPLACE INTO store_settings (key, value, at) VALUES (?, ?, ?)")
|
|
43
|
+
.run(PROVIDERS_SETTING, JSON.stringify([...others, entry]), now);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
@@ -83,7 +83,7 @@ export interface Label {
|
|
|
83
83
|
origin: "file" | "owner";
|
|
84
84
|
}
|
|
85
85
|
/** A thing's tags by name, with whether only a file states each. */
|
|
86
|
-
export declare const labelsOf: (database: CacheDatabase, thing: Thing) => Label[];
|
|
86
|
+
export declare const labelsOf: (database: CacheDatabase, thing: Thing, tag?: string) => Label[];
|
|
87
87
|
/**
|
|
88
88
|
* Marks one topic as the thing's main one, or clears it with `null`: the topic is tagged on it if it was
|
|
89
89
|
* not, and any other main topic stops being main.
|
|
@@ -156,9 +156,9 @@ export const removeTags = ({ database }, thing, tags, source) => {
|
|
|
156
156
|
});
|
|
157
157
|
};
|
|
158
158
|
/** A thing's tags by name, with whether only a file states each. */
|
|
159
|
-
export const labelsOf = (database, thing) => database
|
|
160
|
-
.prepare(
|
|
161
|
-
.all(thing.type, thing.id)
|
|
159
|
+
export const labelsOf = (database, thing, tag) => database
|
|
160
|
+
.prepare(`SELECT t.name, g.source FROM taggings g JOIN tags t ON t.id = g.tag_id WHERE g.taggable_type=? AND g.taggable_id=?${tag === undefined ? "" : " AND t.name = ?"} ORDER BY t.name`)
|
|
161
|
+
.all(thing.type, thing.id, ...(tag === undefined ? [] : [tag]))
|
|
162
162
|
.map((row) => ({ tag: String(row.name), origin: row.source === "file" ? "file" : "owner" }));
|
|
163
163
|
/**
|
|
164
164
|
* Marks one topic as the thing's main one, or clears it with `null`: the topic is tagged on it if it was
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.412.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",
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
"@types/node": "^22.20.4",
|
|
210
210
|
"@types/pngjs": "6.0.5",
|
|
211
211
|
"@vitest/coverage-v8": "^5.0.2",
|
|
212
|
-
"@wirecat/cli-base": "0.
|
|
212
|
+
"@wirecat/cli-base": "0.51.0",
|
|
213
213
|
"commander": "15.0.0",
|
|
214
214
|
"cspell": "10.3.6",
|
|
215
215
|
"drizzle-kit": "1.0.0-rc.4",
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
},
|
|
230
230
|
"peerDependencies": {
|
|
231
231
|
"@napi-rs/canvas": ">=0.1.69 <2",
|
|
232
|
-
"@wirecat/cli-base": ">=0.
|
|
232
|
+
"@wirecat/cli-base": ">=0.51.0 <0.52.0",
|
|
233
233
|
"commander": ">=15"
|
|
234
234
|
},
|
|
235
235
|
"bin": {
|
package/parity.json
CHANGED
|
@@ -77,12 +77,15 @@
|
|
|
77
77
|
"meaning": "the first time only: how to get this profile's app from my.telegram.org",
|
|
78
78
|
"default": "browser"
|
|
79
79
|
},
|
|
80
|
+
"--append": {
|
|
81
|
+
"meaning": "keep existing entries and add the explicitly named one beside them"
|
|
82
|
+
},
|
|
80
83
|
"--approval": {
|
|
81
84
|
"meaning": "who joins by it asks first, and an admin lets them in"
|
|
82
85
|
},
|
|
83
86
|
"--as": {
|
|
84
87
|
"value": "<state>",
|
|
85
|
-
"meaning": "how a task is closed: done, or dismissed
|
|
88
|
+
"meaning": "how a task is closed: done, or dismissed — it needs no answer"
|
|
86
89
|
},
|
|
87
90
|
"--as-file": {
|
|
88
91
|
"meaning": "send every --file as a plain file to download, a video included"
|
|
@@ -142,7 +145,7 @@
|
|
|
142
145
|
},
|
|
143
146
|
"--bots": {
|
|
144
147
|
"value": "<profiles>",
|
|
145
|
-
"meaning": "also read these bots' copies, comma separated
|
|
148
|
+
"meaning": "also read these bots' copies, comma separated — each allowed by read_other_bots"
|
|
146
149
|
},
|
|
147
150
|
"--brief": {
|
|
148
151
|
"meaning": "found messages as reference, title, time, sender and excerpt only"
|
|
@@ -150,7 +153,7 @@
|
|
|
150
153
|
"--by": {
|
|
151
154
|
"value": "<grouping>",
|
|
152
155
|
"meaning": "what to count by",
|
|
153
|
-
"note": "each command names its own groupings
|
|
156
|
+
"note": "each command names its own groupings — stats messages show chat, sender, day or hour, and searches create the same for stats messages show --saved; stats chats show day or week, as a series beside its totals — so it differs on purpose (Help text rule 4)"
|
|
154
157
|
},
|
|
155
158
|
"--calls": {
|
|
156
159
|
"value": "<who>",
|
|
@@ -159,7 +162,7 @@
|
|
|
159
162
|
"--can": {
|
|
160
163
|
"value": "<rights>",
|
|
161
164
|
"meaning": "what they may do, comma-separated: read, members, admins, info, pin, link, post, edit, delete",
|
|
162
|
-
"note": "lists the rights each messenger has
|
|
165
|
+
"note": "lists the rights each messenger has — MAX has `read`, Telegram does not — so it differs on purpose (Help text rule 4)"
|
|
163
166
|
},
|
|
164
167
|
"--caption-above": {
|
|
165
168
|
"meaning": "show the text above the --photo or --file, not below it"
|
|
@@ -213,7 +216,7 @@
|
|
|
213
216
|
},
|
|
214
217
|
"--chunk-bytes": {
|
|
215
218
|
"value": "<n>",
|
|
216
|
-
"meaning": "maximum source bytes returned from a retained attachment; 1
|
|
219
|
+
"meaning": "maximum source bytes returned from a retained attachment; 1–1048576",
|
|
217
220
|
"default": "524288"
|
|
218
221
|
},
|
|
219
222
|
"--claim": {
|
|
@@ -272,11 +275,11 @@
|
|
|
272
275
|
"value": "<days>"
|
|
273
276
|
},
|
|
274
277
|
"--debug": {
|
|
275
|
-
"meaning": "on a failure, its whole record
|
|
278
|
+
"meaning": "on a failure, its whole record — cause and stack — in place of the short line"
|
|
276
279
|
},
|
|
277
280
|
"--deep": {
|
|
278
281
|
"value": "<n>",
|
|
279
|
-
"meaning": "also check the top n in full
|
|
282
|
+
"meaning": "also check the top n in full — profile, photos, everything they wrote, and the public ban lists, which are sent their ids — one person a second",
|
|
280
283
|
"note": "TG specializes the SDK help with the bounded Telegram audit; MAX retains the generic SDK wording. Align the shared help with provider capabilities separately; SDK adoption alone does not remove the difference."
|
|
281
284
|
},
|
|
282
285
|
"--defaults": {
|
|
@@ -297,7 +300,7 @@
|
|
|
297
300
|
},
|
|
298
301
|
"--dims": {
|
|
299
302
|
"value": "<n>",
|
|
300
|
-
"meaning": "remote: the vector size
|
|
303
|
+
"meaning": "remote: the vector size — needed with --base-url; shortens an OpenAI model's"
|
|
301
304
|
},
|
|
302
305
|
"--disappear-after": {
|
|
303
306
|
"value": "<duration|off>",
|
|
@@ -362,7 +365,7 @@
|
|
|
362
365
|
"--expire-time": {
|
|
363
366
|
"value": "<time>",
|
|
364
367
|
"meaning": "it stops working then: 2026-09-25T09:00 (local time), or 30m, 2h, 7d from now",
|
|
365
|
-
"note": "messages pin takes only the lengths its messenger offers, and says how long a pin lasts without it
|
|
368
|
+
"note": "messages pin takes only the lengths its messenger offers, and says how long a pin lasts without it — so it differs on purpose (Help text rule 4)"
|
|
366
369
|
},
|
|
367
370
|
"--extract": {
|
|
368
371
|
"meaning": "extract text from files mapped by this download"
|
|
@@ -401,7 +404,7 @@
|
|
|
401
404
|
"default": "all"
|
|
402
405
|
},
|
|
403
406
|
"--for-everyone": {
|
|
404
|
-
"meaning": "delete for everyone in the chat, not only for you
|
|
407
|
+
"meaning": "delete for everyone in the chat, not only for you — they cannot get it back"
|
|
405
408
|
},
|
|
406
409
|
"--format": {
|
|
407
410
|
"value": "<format>",
|
|
@@ -443,7 +446,7 @@
|
|
|
443
446
|
},
|
|
444
447
|
"--idle": {
|
|
445
448
|
"value": "<duration>",
|
|
446
|
-
"meaning": "stop after this long with nobody using it
|
|
449
|
+
"meaning": "stop after this long with nobody using it — 15m, 1h"
|
|
447
450
|
},
|
|
448
451
|
"--include": {
|
|
449
452
|
"value": "<kinds>",
|
|
@@ -501,7 +504,7 @@
|
|
|
501
504
|
"--link": {
|
|
502
505
|
"value": "<link>",
|
|
503
506
|
"meaning": "an invite link: only the requests made through it",
|
|
504
|
-
"note": "accept and decline take it with --all
|
|
507
|
+
"note": "accept and decline take it with --all — one link, worded for each command (Help text rule 4)"
|
|
505
508
|
},
|
|
506
509
|
"--local": {
|
|
507
510
|
"meaning": "use the model on this machine, never the messenger"
|
|
@@ -606,7 +609,7 @@
|
|
|
606
609
|
"meaning": "people may pick several answers"
|
|
607
610
|
},
|
|
608
611
|
"--new": {
|
|
609
|
-
"meaning": "what arrived since the last check, each message once
|
|
612
|
+
"meaning": "what arrived since the last check, each message once — for scheduled runs",
|
|
610
613
|
"note": "tasks add instead opens the task although tasks that may be the same job were listed"
|
|
611
614
|
},
|
|
612
615
|
"--newest": {
|
|
@@ -719,7 +722,7 @@
|
|
|
719
722
|
"--output": {
|
|
720
723
|
"meaning": "where to write: a directory for `messages download`, a file for `store export`",
|
|
721
724
|
"default": ".",
|
|
722
|
-
"note": "`store export` and other commands use --output for a file; `messages download` takes --output-dir
|
|
725
|
+
"note": "`store export` and other commands use --output for a file; `messages download` takes --output-dir — e10"
|
|
723
726
|
},
|
|
724
727
|
"--output-dir": {
|
|
725
728
|
"value": "<dir>",
|
|
@@ -740,6 +743,10 @@
|
|
|
740
743
|
"meaning": "how many items one request to the messenger asks for; the messenger's own if not given",
|
|
741
744
|
"note": "the default is each messenger's own page: 30 on MAX, 100 on Telegram"
|
|
742
745
|
},
|
|
746
|
+
"--parent": {
|
|
747
|
+
"value": "<id>",
|
|
748
|
+
"meaning": "parent task in the same project; none clears it"
|
|
749
|
+
},
|
|
743
750
|
"--pause": {
|
|
744
751
|
"value": "<duration>",
|
|
745
752
|
"meaning": "the least wait between pages, 5s or 500ms; each is up to twice that",
|
|
@@ -767,7 +774,7 @@
|
|
|
767
774
|
},
|
|
768
775
|
"--photo": {
|
|
769
776
|
"value": "<file>",
|
|
770
|
-
"meaning": "an image file
|
|
777
|
+
"meaning": "an image file — a profile photo in `account update`, a group's photo in `chats update`, a photo to send in `messages send`"
|
|
771
778
|
},
|
|
772
779
|
"--pin": {
|
|
773
780
|
"value": "<chat>",
|
|
@@ -781,6 +788,10 @@
|
|
|
781
788
|
"value": "<port>",
|
|
782
789
|
"meaning": "the local port behind the tunnel, for mcp --http or bot watch --public-url"
|
|
783
790
|
},
|
|
791
|
+
"--priority": {
|
|
792
|
+
"value": "<n>",
|
|
793
|
+
"meaning": "task priority from 0 (urgent) through 4 (low)"
|
|
794
|
+
},
|
|
784
795
|
"--problems": {
|
|
785
796
|
"meaning": "only failed responses, warnings and crashes"
|
|
786
797
|
},
|
|
@@ -808,10 +819,10 @@
|
|
|
808
819
|
},
|
|
809
820
|
"--reason": {
|
|
810
821
|
"value": "<text>",
|
|
811
|
-
"meaning": "why a task was closed, kept with it
|
|
822
|
+
"meaning": "why a task was closed, kept with it — no-reply-needed, for example"
|
|
812
823
|
},
|
|
813
824
|
"--record": {
|
|
814
|
-
"meaning": "keep this run under `runs`
|
|
825
|
+
"meaning": "keep this run under `runs` — ids and timings, never message content",
|
|
815
826
|
"note": "max's own copy is worded differently until T6 moves the command onto the shared one (e13)"
|
|
816
827
|
},
|
|
817
828
|
"--remind-time": {
|
|
@@ -861,10 +872,6 @@
|
|
|
861
872
|
"value": "<name|id>",
|
|
862
873
|
"meaning": "run a saved search, or an earlier run by its id; options typed with it replace its own, more words are AND-ed"
|
|
863
874
|
},
|
|
864
|
-
"--scope": {
|
|
865
|
-
"value": "<scope>",
|
|
866
|
-
"meaning": "only what belongs to personal or to work accounts: personal or work"
|
|
867
|
-
},
|
|
868
875
|
"--score": {
|
|
869
876
|
"value": "<helpful|active|engaging>",
|
|
870
877
|
"meaning": "the named ranking score preset; not with an explicit --measure"
|
|
@@ -874,7 +881,7 @@
|
|
|
874
881
|
"meaning": "keep this secret beside the bot token instead of the token, at a hidden prompt; never from the command line"
|
|
875
882
|
},
|
|
876
883
|
"--secret-stdin": {
|
|
877
|
-
"meaning": "a secret MAX sends back in X-Max-Bot-Api-Secret
|
|
884
|
+
"meaning": "a secret MAX sends back in X-Max-Bot-Api-Secret — asked for, or read from a pipe"
|
|
878
885
|
},
|
|
879
886
|
"--selection": {
|
|
880
887
|
"value": "<json>",
|
|
@@ -904,7 +911,7 @@
|
|
|
904
911
|
"--since": {
|
|
905
912
|
"value": "<id-or-time>",
|
|
906
913
|
"meaning": "from this message id, an ISO 8601 time, or 2h / 1d ago; each command says its default",
|
|
907
|
-
"note": "becomes `--since-time` everywhere
|
|
914
|
+
"note": "becomes `--since-time` everywhere — NEED-485"
|
|
908
915
|
},
|
|
909
916
|
"--since-time": {
|
|
910
917
|
"value": "<time>",
|
|
@@ -912,7 +919,7 @@
|
|
|
912
919
|
},
|
|
913
920
|
"--size": {
|
|
914
921
|
"value": "<n>",
|
|
915
|
-
"meaning": "messages to answer per batch, 10
|
|
922
|
+
"meaning": "messages to answer per batch, 10–200; 50 by default"
|
|
916
923
|
},
|
|
917
924
|
"--skip": {
|
|
918
925
|
"value": "<which>",
|
|
@@ -927,8 +934,8 @@
|
|
|
927
934
|
},
|
|
928
935
|
"--source": {
|
|
929
936
|
"value": "<accounts>",
|
|
930
|
-
"meaning": "which accounts: personal, bots or all, a provider, or a list of provider:account as a hit shows it, a provider, a kind (messages, mail, notes, documents, meetings) or group:<name>
|
|
931
|
-
"note": "each search reads the accounts of its own kinds and names the rest in skipped
|
|
937
|
+
"meaning": "which accounts: personal, bots or all, a provider, or a list of provider:account as a hit shows it, a provider, a kind (messages, mail, notes, documents, meetings) or group:<name> — the same as in: in the query",
|
|
938
|
+
"note": "each search reads the accounts of its own kinds and names the rest in skipped — source-everywhere-plan.md"
|
|
932
939
|
},
|
|
933
940
|
"--spoiler": {
|
|
934
941
|
"meaning": "hide the --photo or video behind a spoiler until tapped"
|
|
@@ -1002,7 +1009,7 @@
|
|
|
1002
1009
|
},
|
|
1003
1010
|
"--timeout": {
|
|
1004
1011
|
"value": "<duration>",
|
|
1005
|
-
"meaning": "give up on the whole command after this
|
|
1012
|
+
"meaning": "give up on the whole command after this — 30s, 2m, 500ms"
|
|
1006
1013
|
},
|
|
1007
1014
|
"--timezone": {
|
|
1008
1015
|
"value": "<zone>",
|
|
@@ -1039,7 +1046,7 @@
|
|
|
1039
1046
|
"--type": {
|
|
1040
1047
|
"value": "<names>",
|
|
1041
1048
|
"meaning": "only these types",
|
|
1042
|
-
"note": "each command names its own types
|
|
1049
|
+
"note": "each command names its own types — tasks add gives the new task question, request, mention or promise — so it differs on purpose (Help text rule 4)"
|
|
1043
1050
|
},
|
|
1044
1051
|
"--types": {
|
|
1045
1052
|
"value": "<value>",
|
|
@@ -1047,7 +1054,7 @@
|
|
|
1047
1054
|
},
|
|
1048
1055
|
"--unanswered": {
|
|
1049
1056
|
"value": "[duration]",
|
|
1050
|
-
"meaning": "only questions to you or a group's admins that nobody answered, asked at least this long ago
|
|
1057
|
+
"meaning": "only questions to you or a group's admins that nobody answered, asked at least this long ago — 4h, 1d",
|
|
1051
1058
|
"note": "max's own `review` still takes bare hours until T6 moves it (e2)",
|
|
1052
1059
|
"default": "24h"
|
|
1053
1060
|
},
|
|
@@ -1058,7 +1065,7 @@
|
|
|
1058
1065
|
"--until-id": {
|
|
1059
1066
|
"value": "<id>",
|
|
1060
1067
|
"meaning": "only up to this message id, inclusive; the newest by default",
|
|
1061
|
-
"note": "tg's `bot
|
|
1068
|
+
"note": "tg's `bot messages sync` takes a message link here, the message the sync starts at, inclusive"
|
|
1062
1069
|
},
|
|
1063
1070
|
"--until-time": {
|
|
1064
1071
|
"value": "<time>",
|
|
@@ -1910,6 +1917,36 @@
|
|
|
1910
1917
|
"wa": "whatsapp-cli: wa bot API, plans/2026-10-22-wa-bot-api"
|
|
1911
1918
|
}
|
|
1912
1919
|
},
|
|
1920
|
+
"bot messages sync": {
|
|
1921
|
+
"in": ["max", "tg"],
|
|
1922
|
+
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account",
|
|
1923
|
+
"options": {
|
|
1924
|
+
"--last": {
|
|
1925
|
+
"in": ["max", "tg"],
|
|
1926
|
+
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
1927
|
+
},
|
|
1928
|
+
"--limit": {
|
|
1929
|
+
"in": ["max", "tg"],
|
|
1930
|
+
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
1931
|
+
},
|
|
1932
|
+
"--page-size": {
|
|
1933
|
+
"in": ["max", "tg"],
|
|
1934
|
+
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
1935
|
+
},
|
|
1936
|
+
"--pause": {
|
|
1937
|
+
"in": ["max", "tg"],
|
|
1938
|
+
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
1939
|
+
},
|
|
1940
|
+
"--since-time": {
|
|
1941
|
+
"in": ["max", "tg"],
|
|
1942
|
+
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
1943
|
+
},
|
|
1944
|
+
"--until-id": {
|
|
1945
|
+
"in": ["tg"],
|
|
1946
|
+
"reason": "Telegram bots read message numbers and need a starting link when none is known; MAX pages chat history directly; WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
},
|
|
1913
1950
|
"bot messages unpin": {
|
|
1914
1951
|
"in": ["max", "tg"],
|
|
1915
1952
|
"planned": {
|
|
@@ -2008,40 +2045,6 @@
|
|
|
2008
2045
|
"wa": "whatsapp-cli: wa bot API, plans/2026-10-22-wa-bot-api"
|
|
2009
2046
|
}
|
|
2010
2047
|
},
|
|
2011
|
-
"bot store": {
|
|
2012
|
-
"in": ["max", "tg"],
|
|
2013
|
-
"reason": "Meta's Cloud API keeps no history a bot can fetch; WhatsApp bots get only what arrives by webhook"
|
|
2014
|
-
},
|
|
2015
|
-
"bot store fetch": {
|
|
2016
|
-
"in": ["max", "tg"],
|
|
2017
|
-
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account",
|
|
2018
|
-
"options": {
|
|
2019
|
-
"--last": {
|
|
2020
|
-
"in": ["max", "tg"],
|
|
2021
|
-
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
2022
|
-
},
|
|
2023
|
-
"--limit": {
|
|
2024
|
-
"in": ["max", "tg"],
|
|
2025
|
-
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
2026
|
-
},
|
|
2027
|
-
"--page-size": {
|
|
2028
|
-
"in": ["max", "tg"],
|
|
2029
|
-
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
2030
|
-
},
|
|
2031
|
-
"--pause": {
|
|
2032
|
-
"in": ["max", "tg"],
|
|
2033
|
-
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
2034
|
-
},
|
|
2035
|
-
"--since-time": {
|
|
2036
|
-
"in": ["max", "tg"],
|
|
2037
|
-
"reason": "WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
2038
|
-
},
|
|
2039
|
-
"--until-id": {
|
|
2040
|
-
"in": ["tg"],
|
|
2041
|
-
"reason": "Telegram bots read message numbers and need a starting link when none is known; MAX pages chat history directly; WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
},
|
|
2045
2048
|
"bot templates": {
|
|
2046
2049
|
"in": [],
|
|
2047
2050
|
"reason": "message templates are WhatsApp Business's; MAX and Telegram bots write freely",
|
|
@@ -2097,7 +2100,7 @@
|
|
|
2097
2100
|
"bot webhooks set": {
|
|
2098
2101
|
"in": ["max", "tg"],
|
|
2099
2102
|
"options": {
|
|
2100
|
-
"--
|
|
2103
|
+
"--append": {
|
|
2101
2104
|
"in": ["max"],
|
|
2102
2105
|
"reason": "a Telegram bot holds one webhook address; WhatsApp's bots are the Business Platform's, on a business number; wa links a personal account"
|
|
2103
2106
|
},
|
|
@@ -2178,11 +2181,7 @@
|
|
|
2178
2181
|
}
|
|
2179
2182
|
},
|
|
2180
2183
|
"chats archive": {
|
|
2181
|
-
"in": [],
|
|
2182
|
-
"planned": {
|
|
2183
|
-
"tg": "tg-cli TG-5: chat archive, pin and unread",
|
|
2184
|
-
"wa": "wa stream S1: chat archive, pin and unread"
|
|
2185
|
-
},
|
|
2184
|
+
"in": ["tg", "wa"],
|
|
2186
2185
|
"reason": "MAX: no measured request archives, pins or marks a chat unread"
|
|
2187
2186
|
},
|
|
2188
2187
|
"chats clear": {
|
|
@@ -2299,7 +2298,7 @@
|
|
|
2299
2298
|
},
|
|
2300
2299
|
"chats folders order": {
|
|
2301
2300
|
"in": ["max", "tg"],
|
|
2302
|
-
"reason": "wa declares folderOrder: false
|
|
2301
|
+
"reason": "wa declares folderOrder: false — WhatsApp's chat lists have no order a linked device sets"
|
|
2303
2302
|
},
|
|
2304
2303
|
"chats folders show": {
|
|
2305
2304
|
"in": "all"
|
|
@@ -2438,11 +2437,7 @@
|
|
|
2438
2437
|
}
|
|
2439
2438
|
},
|
|
2440
2439
|
"chats mark-unread": {
|
|
2441
|
-
"in": [],
|
|
2442
|
-
"planned": {
|
|
2443
|
-
"tg": "tg-cli TG-5: chat archive, pin and unread",
|
|
2444
|
-
"wa": "wa stream S1: chat archive, pin and unread"
|
|
2445
|
-
},
|
|
2440
|
+
"in": ["tg", "wa"],
|
|
2446
2441
|
"reason": "MAX: no measured request archives, pins or marks a chat unread"
|
|
2447
2442
|
},
|
|
2448
2443
|
"chats media": {
|
|
@@ -2541,11 +2536,7 @@
|
|
|
2541
2536
|
}
|
|
2542
2537
|
},
|
|
2543
2538
|
"chats pin": {
|
|
2544
|
-
"in": [],
|
|
2545
|
-
"planned": {
|
|
2546
|
-
"tg": "tg-cli TG-5: chat archive, pin and unread",
|
|
2547
|
-
"wa": "wa stream S1: chat archive, pin and unread"
|
|
2548
|
-
},
|
|
2539
|
+
"in": ["tg", "wa"],
|
|
2549
2540
|
"reason": "MAX: no measured request archives, pins or marks a chat unread"
|
|
2550
2541
|
},
|
|
2551
2542
|
"chats requests": {
|
|
@@ -2641,11 +2632,7 @@
|
|
|
2641
2632
|
"in": "all"
|
|
2642
2633
|
},
|
|
2643
2634
|
"chats unarchive": {
|
|
2644
|
-
"in": [],
|
|
2645
|
-
"planned": {
|
|
2646
|
-
"tg": "tg-cli TG-5: chat archive, pin and unread",
|
|
2647
|
-
"wa": "wa stream S1: chat archive, pin and unread"
|
|
2648
|
-
},
|
|
2635
|
+
"in": ["tg", "wa"],
|
|
2649
2636
|
"reason": "MAX: no measured request archives, pins or marks a chat unread"
|
|
2650
2637
|
},
|
|
2651
2638
|
"chats unmute": {
|
|
@@ -2656,11 +2643,7 @@
|
|
|
2656
2643
|
}
|
|
2657
2644
|
},
|
|
2658
2645
|
"chats unpin": {
|
|
2659
|
-
"in": [],
|
|
2660
|
-
"planned": {
|
|
2661
|
-
"tg": "tg-cli TG-5: chat archive, pin and unread",
|
|
2662
|
-
"wa": "wa stream S1: chat archive, pin and unread"
|
|
2663
|
-
},
|
|
2646
|
+
"in": ["tg", "wa"],
|
|
2664
2647
|
"reason": "MAX: no measured request archives, pins or marks a chat unread"
|
|
2665
2648
|
},
|
|
2666
2649
|
"chats update": {
|
|
@@ -2804,10 +2787,7 @@
|
|
|
2804
2787
|
"in": "all",
|
|
2805
2788
|
"options": {
|
|
2806
2789
|
"--cursor": "all",
|
|
2807
|
-
"--limit": "all"
|
|
2808
|
-
"--scope": "all",
|
|
2809
|
-
"--since-time": "all",
|
|
2810
|
-
"--until-time": "all"
|
|
2790
|
+
"--limit": "all"
|
|
2811
2791
|
}
|
|
2812
2792
|
},
|
|
2813
2793
|
"contacts import": {
|
|
@@ -3901,8 +3881,8 @@
|
|
|
3901
3881
|
"--backend": {
|
|
3902
3882
|
"in": [],
|
|
3903
3883
|
"planned": {
|
|
3904
|
-
"max": "each CLI
|
|
3905
|
-
"tg": "each CLI
|
|
3884
|
+
"max": "each CLI’s next cli-core bump",
|
|
3885
|
+
"tg": "each CLI’s next cli-core bump"
|
|
3906
3886
|
},
|
|
3907
3887
|
"reason": "WhatsApp has no server search; wa reads its history from the local store"
|
|
3908
3888
|
},
|
|
@@ -3911,8 +3891,8 @@
|
|
|
3911
3891
|
"--max-meetings": {
|
|
3912
3892
|
"in": ["wa"],
|
|
3913
3893
|
"planned": {
|
|
3914
|
-
"max": "each CLI
|
|
3915
|
-
"tg": "each CLI
|
|
3894
|
+
"max": "each CLI’s next cli-core bump",
|
|
3895
|
+
"tg": "each CLI’s next cli-core bump"
|
|
3916
3896
|
}
|
|
3917
3897
|
},
|
|
3918
3898
|
"--only": "all",
|
|
@@ -3920,16 +3900,16 @@
|
|
|
3920
3900
|
"--server-time": {
|
|
3921
3901
|
"in": [],
|
|
3922
3902
|
"planned": {
|
|
3923
|
-
"max": "each CLI
|
|
3924
|
-
"tg": "each CLI
|
|
3903
|
+
"max": "each CLI’s next cli-core bump",
|
|
3904
|
+
"tg": "each CLI’s next cli-core bump"
|
|
3925
3905
|
},
|
|
3926
3906
|
"reason": "WhatsApp has no server search; wa reads its history from the local store"
|
|
3927
3907
|
},
|
|
3928
3908
|
"--source": {
|
|
3929
3909
|
"in": ["wa"],
|
|
3930
3910
|
"planned": {
|
|
3931
|
-
"max": "each CLI
|
|
3932
|
-
"tg": "each CLI
|
|
3911
|
+
"max": "each CLI’s next cli-core bump",
|
|
3912
|
+
"tg": "each CLI’s next cli-core bump"
|
|
3933
3913
|
}
|
|
3934
3914
|
},
|
|
3935
3915
|
"--timezone": "all"
|
|
@@ -4042,8 +4022,8 @@
|
|
|
4042
4022
|
"--source": {
|
|
4043
4023
|
"in": ["wa"],
|
|
4044
4024
|
"planned": {
|
|
4045
|
-
"max": "each CLI
|
|
4046
|
-
"tg": "each CLI
|
|
4025
|
+
"max": "each CLI’s next cli-core bump",
|
|
4026
|
+
"tg": "each CLI’s next cli-core bump"
|
|
4047
4027
|
}
|
|
4048
4028
|
},
|
|
4049
4029
|
"--timezone": "all"
|
|
@@ -4053,8 +4033,7 @@
|
|
|
4053
4033
|
"in": "all",
|
|
4054
4034
|
"options": {
|
|
4055
4035
|
"--limit": "all",
|
|
4056
|
-
"--page": "all"
|
|
4057
|
-
"--since-time": "all"
|
|
4036
|
+
"--page": "all"
|
|
4058
4037
|
}
|
|
4059
4038
|
},
|
|
4060
4039
|
"search topics": {
|
|
@@ -4735,15 +4714,15 @@
|
|
|
4735
4714
|
"--as-owner": {
|
|
4736
4715
|
"in": ["wa"],
|
|
4737
4716
|
"planned": {
|
|
4738
|
-
"max": "each CLI
|
|
4739
|
-
"tg": "each CLI
|
|
4717
|
+
"max": "each CLI’s next cli-core bump",
|
|
4718
|
+
"tg": "each CLI’s next cli-core bump"
|
|
4740
4719
|
}
|
|
4741
4720
|
},
|
|
4742
4721
|
"--certainty": {
|
|
4743
4722
|
"in": ["wa"],
|
|
4744
4723
|
"planned": {
|
|
4745
|
-
"max": "each CLI
|
|
4746
|
-
"tg": "each CLI
|
|
4724
|
+
"max": "each CLI’s next cli-core bump",
|
|
4725
|
+
"tg": "each CLI’s next cli-core bump"
|
|
4747
4726
|
}
|
|
4748
4727
|
},
|
|
4749
4728
|
"--reason": {
|
|
@@ -4824,6 +4803,8 @@
|
|
|
4824
4803
|
"--category": "all",
|
|
4825
4804
|
"--description": "all",
|
|
4826
4805
|
"--due": "all",
|
|
4806
|
+
"--parent": "all",
|
|
4807
|
+
"--priority": "all",
|
|
4827
4808
|
"--remind-time": "all",
|
|
4828
4809
|
"--title": "all"
|
|
4829
4810
|
}
|
package/dist/cli/bot/store.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import type { BotMessenger } from "./port.js";
|
|
3
|
-
/**
|
|
4
|
-
* `bot store fetch`: a chat's history into the bot's local copy, newest to oldest and resumable, as the
|
|
5
|
-
* personal `messages sync` does. Mounted for a messenger whose Bot API pages back through a chat.
|
|
6
|
-
*/
|
|
7
|
-
export declare const botStoreCommand: (bot: BotMessenger, fetching: NonNullable<BotMessenger["fetching"]>) => Command;
|