@wirecat/cli-core 0.614.0 → 0.616.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 +105 -0
- package/dist/background/report/messages.d.ts +108 -0
- package/dist/background/report/messages.js +230 -0
- package/dist/background/report/render.d.ts +41 -5
- package/dist/background/report/render.js +115 -25
- package/dist/background/report/schema.d.ts +7 -1
- package/dist/background/report/schema.js +9 -3
- package/dist/background/report/stored-templates.d.ts +66 -0
- package/dist/background/report/stored-templates.js +85 -0
- package/dist/background/report/templates/morning-digest.email.en.liquid +3 -0
- package/dist/background/report/templates/morning-digest.email.ru.liquid +3 -0
- package/dist/background/report/templates/morning-digest.sample.json +157 -0
- package/dist/background/report/templates/morning-digest.telegram.en.liquid +3 -0
- package/dist/background/report/templates/morning-digest.telegram.ru.liquid +3 -0
- package/dist/background/report/templates/morning-digest.text.en.liquid +3 -0
- package/dist/background/report/templates/morning-digest.text.ru.liquid +3 -0
- package/dist/background/report/templates/schedule-failed.email.en.liquid +12 -0
- package/dist/background/report/templates/schedule-failed.email.ru.liquid +12 -0
- package/dist/background/report/templates/schedule-failed.sample.json +10 -0
- package/dist/background/report/templates/schedule-failed.telegram.en.liquid +9 -0
- package/dist/background/report/templates/schedule-failed.telegram.ru.liquid +9 -0
- package/dist/background/report/templates/schedule-failed.text.en.liquid +9 -0
- package/dist/background/report/templates/schedule-failed.text.ru.liquid +9 -0
- package/dist/background/report/templates/weekly-gaps.email.en.liquid +19 -0
- package/dist/background/report/templates/weekly-gaps.email.ru.liquid +19 -0
- package/dist/background/report/templates/weekly-gaps.sample.json +33 -0
- package/dist/background/report/templates/weekly-gaps.telegram.en.liquid +15 -0
- package/dist/background/report/templates/weekly-gaps.telegram.ru.liquid +15 -0
- package/dist/background/report/templates/weekly-gaps.text.en.liquid +14 -0
- package/dist/background/report/templates/weekly-gaps.text.ru.liquid +14 -0
- package/dist/background/report/view.d.ts +5 -0
- package/dist/background/report/view.js +9 -1
- package/dist/background/schedules.d.ts +13 -2
- package/dist/background/schedules.js +128 -30
- package/dist/cli/help/sections.js +1 -0
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/schedule/schedule-command.d.ts +2 -0
- package/dist/cli/schedule/schedule-command.js +21 -2
- package/dist/cli/shared-command-exports.d.ts +1 -0
- package/dist/cli/shared-command-exports.js +2 -0
- package/dist/cli/templates-command.d.ts +16 -0
- package/dist/cli/templates-command.js +266 -0
- package/dist/domain/links.d.ts +1 -1
- package/dist/domain/links.js +1 -1
- package/dist/entities/fact.d.ts +4 -0
- package/dist/entities/fact.js +2 -1
- package/dist/entities/fields.d.ts +5 -0
- package/dist/entities/fields.js +3 -0
- package/dist/entities/index.d.ts +21 -1
- package/dist/entities/index.js +3 -1
- package/dist/entities/list-results.d.ts +4 -2
- package/dist/entities/list-results.js +4 -2
- package/dist/entities/memory.d.ts +4 -0
- package/dist/entities/memory.js +2 -1
- package/dist/entities/template.d.ts +11 -0
- package/dist/entities/template.js +12 -0
- package/dist/errors/reasons.js +13 -0
- package/dist/meetings/mcp/index.d.ts +15 -15
- package/dist/services/metadata.d.ts +1 -1
- package/dist/store/exports.d.ts +2 -0
- package/dist/store/exports.js +2 -0
- package/dist/store/index.d.ts +4 -2
- package/dist/store/index.js +1 -0
- package/dist/store/people.d.ts +7 -0
- package/dist/store/people.js +4 -0
- package/dist/store/source-review.d.ts +21 -0
- package/dist/store/sqlite/accounts.d.ts +3 -1
- package/dist/store/sqlite/accounts.js +10 -3
- package/dist/store/sqlite/added-sources.d.ts +16 -0
- package/dist/store/sqlite/added-sources.js +22 -0
- package/dist/store/sqlite/facts.js +3 -2
- package/dist/store/sqlite/imported-documents.js +3 -2
- package/dist/store/sqlite/knowledge.js +6 -4
- package/dist/store/sqlite/manifest.js +1 -0
- package/dist/store/sqlite/memories.js +5 -4
- package/dist/store/sqlite/mention-drain.js +9 -1
- package/dist/store/sqlite/merged-persons.d.ts +24 -0
- package/dist/store/sqlite/merged-persons.js +59 -0
- package/dist/store/sqlite/migrations.generated.js +8 -0
- package/dist/store/sqlite/notes.js +5 -4
- package/dist/store/sqlite/person-links.d.ts +10 -1
- package/dist/store/sqlite/person-links.js +14 -6
- package/dist/store/sqlite/person-merges.d.ts +39 -0
- package/dist/store/sqlite/person-merges.js +136 -0
- package/dist/store/sqlite/person-preparation.js +11 -8
- package/dist/store/sqlite/person-resolution.js +2 -1
- package/dist/store/sqlite/person-scope.js +2 -1
- package/dist/store/sqlite/relation-list.js +3 -2
- package/dist/store/sqlite/reported-relations.js +6 -3
- package/dist/store/sqlite/schema/templates.d.ts +242 -0
- package/dist/store/sqlite/schema/templates.js +23 -0
- package/dist/store/sqlite/schema.d.ts +1 -0
- package/dist/store/sqlite/schema.js +1 -0
- package/dist/store/sqlite/source-review.d.ts +20 -1
- package/dist/store/sqlite/source-review.js +74 -3
- package/dist/store/sqlite/task-board.d.ts +6 -1
- package/dist/store/sqlite/task-board.js +22 -4
- package/dist/store/sqlite/templates.d.ts +38 -0
- package/dist/store/sqlite/templates.js +69 -0
- package/dist/store/sqlite/work-tasks.js +8 -9
- package/dist/store/store.d.ts +3 -0
- package/dist/store/store.js +5 -0
- package/dist/store/types.d.ts +2 -0
- package/package.json +4 -4
- package/parity.json +19 -0
|
@@ -5,11 +5,12 @@ import { TASK_TYPES, WORK_TASK_TYPES } from "../../domain/knowledge.js";
|
|
|
5
5
|
import { checkedScore, isClosedState, legacyPriority, PRIORITY_LABELS, priorityBand, priorityLabel, TASK_STATES, } from "../../tasks/index.js";
|
|
6
6
|
import { folded } from "./folded.js";
|
|
7
7
|
import { authorActor } from "./memories.js";
|
|
8
|
+
import { idsOf } from "./merged-persons.js";
|
|
8
9
|
import { CORPORA, drainCorpus } from "./note-index.js";
|
|
9
10
|
import { requiredThing } from "./notes.js";
|
|
10
11
|
import { queryFilter } from "./query-filter.js";
|
|
11
12
|
import { stemmerCache } from "./stems.js";
|
|
12
|
-
import { BOARD_SCOPE, boardOrder, dueGroups, projectTaskColumns, withoutField, } from "./task-board.js";
|
|
13
|
+
import { BOARD_SCOPE, boardOrder, dueGroups, mergedAssignees, projectTaskColumns, TASK_PEOPLE, withoutField, } from "./task-board.js";
|
|
13
14
|
import { closeSuggestionOf, SUGGESTION_COLUMNS } from "./task-close.js";
|
|
14
15
|
import { addComment, authorNamed, commentsOf } from "./task-comments.js";
|
|
15
16
|
import { INBOX_KEY_LENGTH, inboxKey } from "./task-keys.js";
|
|
@@ -161,7 +162,7 @@ export const workTaskOperationsOver = (context) => {
|
|
|
161
162
|
const boardWhere = (query, zone, at) => {
|
|
162
163
|
if (query === undefined)
|
|
163
164
|
return { sql: BOARD_SCOPE, params: [] };
|
|
164
|
-
const where = queryFilter(query, projectTaskColumns(at, timezoneOf(zone)), {
|
|
165
|
+
const where = queryFilter(query, projectTaskColumns(at, timezoneOf(zone), database), {
|
|
165
166
|
command: "tasks list",
|
|
166
167
|
now: at,
|
|
167
168
|
...(zone ? { zone } : {}),
|
|
@@ -438,8 +439,9 @@ export const workTaskOperationsOver = (context) => {
|
|
|
438
439
|
checkRevision(rowById(task), check.revision);
|
|
439
440
|
const person = personOf(to);
|
|
440
441
|
const held = database
|
|
441
|
-
.prepare("SELECT 1 FROM task_assignments WHERE task_id = ? AND assignee_type = 'person'
|
|
442
|
-
|
|
442
|
+
.prepare("SELECT 1 FROM task_assignments WHERE task_id = ? AND assignee_type = 'person' " +
|
|
443
|
+
"AND assignee_id IN (SELECT value FROM json_each(?)) AND role = ?")
|
|
444
|
+
.get(task, idsOf(database, "person", person), role);
|
|
443
445
|
if (held)
|
|
444
446
|
return;
|
|
445
447
|
const at = now();
|
|
@@ -622,11 +624,8 @@ export const workTaskOperationsOver = (context) => {
|
|
|
622
624
|
};
|
|
623
625
|
},
|
|
624
626
|
taskPeople: async ({ limit = 500 } = {}) => database
|
|
625
|
-
.prepare(
|
|
626
|
-
|
|
627
|
-
"LEFT JOIN tasks t ON t.id = a.task_id AND t.deleted_at IS NULL " +
|
|
628
|
-
"GROUP BY p.id ORDER BY p.owner DESC, n DESC, p.name IS NULL, p.name COLLATE NOCASE, p.id LIMIT ?")
|
|
629
|
-
.all(Math.min(Math.max(limit, 1), 5000))
|
|
627
|
+
.prepare(`${TASK_PEOPLE}`)
|
|
628
|
+
.all(mergedAssignees(database), Math.min(Math.max(limit, 1), 5000))
|
|
630
629
|
.map((row) => ({
|
|
631
630
|
person: `person:${row.id}`,
|
|
632
631
|
name: row.name == null ? null : String(row.name),
|
package/dist/store/store.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ import { type RecordStore } from "./sqlite/records.js";
|
|
|
49
49
|
import { type RelationsStore } from "./sqlite/reported-relations.js";
|
|
50
50
|
import { type SubscriptionsStore } from "./sqlite/subscriptions.js";
|
|
51
51
|
import { type StoreTaskStore } from "./sqlite/tasks.js";
|
|
52
|
+
import { type TemplateStore } from "./sqlite/templates.js";
|
|
52
53
|
import { type WalletsStore } from "./sqlite/wallets.js";
|
|
53
54
|
import { type SyncStore } from "./sync.js";
|
|
54
55
|
import { type TagsStore } from "./tags.js";
|
|
@@ -135,6 +136,8 @@ export interface MessageStore {
|
|
|
135
136
|
readonly relations: RelationsStore;
|
|
136
137
|
/** The one-time keys behind the buttons of a message that asks the owner to decide a batch. */
|
|
137
138
|
readonly decisionRequests: DecisionRequestStore;
|
|
139
|
+
/** The message templates the owner saved over the shipped ones, with every body a change replaced. */
|
|
140
|
+
readonly templates: TemplateStore;
|
|
138
141
|
/** What each import said, by the source's identity; `ingest` (services) is the way in. */
|
|
139
142
|
readonly records: RecordStore;
|
|
140
143
|
/** What agents concluded: summaries, digests, facts, preferences, each with evidence and a scope. */
|
package/dist/store/store.js
CHANGED
|
@@ -55,6 +55,7 @@ import { relationsStoreOver } from "./sqlite/reported-relations.js";
|
|
|
55
55
|
import * as stems from "./sqlite/stems.js";
|
|
56
56
|
import { subscriptionsStoreOver } from "./sqlite/subscriptions.js";
|
|
57
57
|
import { taskStoreOver } from "./sqlite/tasks.js";
|
|
58
|
+
import { templateStoreOver } from "./sqlite/templates.js";
|
|
58
59
|
import { walletsStoreOver } from "./sqlite/wallets.js";
|
|
59
60
|
import { storeErrors } from "./store-errors.js";
|
|
60
61
|
import { syncStoreOver } from "./sync.js";
|
|
@@ -135,6 +136,7 @@ const storeOver = (context) => {
|
|
|
135
136
|
const crm = once(() => crmCopiesOver(context, accountPeopleOver(context)));
|
|
136
137
|
const relations = once(() => relationsStoreOver(context));
|
|
137
138
|
const decisionRequests = once(() => decisionRequestStoreOver(context));
|
|
139
|
+
const templates = once(() => templateStoreOver(context));
|
|
138
140
|
const records = once(() => recordStoreOver(context));
|
|
139
141
|
const memories = once(() => memoriesStoreOver(context));
|
|
140
142
|
const proposedActions = once(() => proposedActionsStoreOver(context));
|
|
@@ -277,6 +279,9 @@ const storeOver = (context) => {
|
|
|
277
279
|
get decisionRequests() {
|
|
278
280
|
return decisionRequests();
|
|
279
281
|
},
|
|
282
|
+
get templates() {
|
|
283
|
+
return templates();
|
|
284
|
+
},
|
|
280
285
|
get records() {
|
|
281
286
|
return records();
|
|
282
287
|
},
|
package/dist/store/types.d.ts
CHANGED
|
@@ -67,6 +67,8 @@ export interface PersonRecord {
|
|
|
67
67
|
uid: string;
|
|
68
68
|
name: string | null;
|
|
69
69
|
identities: LinkedIdentity[];
|
|
70
|
+
/** Set when the uid asked for was merged away: the uid of the person its identities are now, the same as `uid`. */
|
|
71
|
+
mergedInto?: string;
|
|
70
72
|
}
|
|
71
73
|
/** What a search of one account's messages takes, the account given apart. */
|
|
72
74
|
export interface AccountMessageFilter {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.616.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",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"type": "module",
|
|
16
16
|
"wirecat": {
|
|
17
17
|
"store": {
|
|
18
|
-
"speaks":
|
|
18
|
+
"speaks": 59,
|
|
19
19
|
"minCompatible": 56
|
|
20
20
|
}
|
|
21
21
|
},
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
"@types/node": "^22.20.5",
|
|
279
279
|
"@types/pngjs": "6.0.5",
|
|
280
280
|
"@vitest/coverage-v8": "^5.0.5",
|
|
281
|
-
"@wirecat/cli-base": "0.
|
|
281
|
+
"@wirecat/cli-base": "0.90.0",
|
|
282
282
|
"@wirecat/cli-core-legacy-tags": "npm:@wirecat/cli-core@0.414.0",
|
|
283
283
|
"ajv": "8.17.1",
|
|
284
284
|
"commander": "15.0.0",
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
},
|
|
300
300
|
"peerDependencies": {
|
|
301
301
|
"@napi-rs/canvas": ">=0.1.69 <2",
|
|
302
|
-
"@wirecat/cli-base": ">=0.80.7 <0.
|
|
302
|
+
"@wirecat/cli-base": ">=0.80.7 <1.0.0",
|
|
303
303
|
"commander": ">=15"
|
|
304
304
|
},
|
|
305
305
|
"bin": {
|
package/parity.json
CHANGED
|
@@ -304,6 +304,9 @@
|
|
|
304
304
|
"--defaults": {
|
|
305
305
|
"meaning": "change what every profile gets, rather than this profile"
|
|
306
306
|
},
|
|
307
|
+
"--delete-data": {
|
|
308
|
+
"meaning": "also delete the account's messages and files on this computer"
|
|
309
|
+
},
|
|
307
310
|
"--deliver-to": {
|
|
308
311
|
"value": "<route>",
|
|
309
312
|
"meaning": "where a schedule's result also goes, when --notify-on says so: telegram-bot:<profile>/<chat>, email:<profile>/<address>; repeat it for more"
|
|
@@ -499,6 +502,9 @@
|
|
|
499
502
|
"--jsonl": {
|
|
500
503
|
"meaning": "machine-readable output: one JSON object per line, for streaming and jq"
|
|
501
504
|
},
|
|
505
|
+
"--keep-data": {
|
|
506
|
+
"meaning": "keep the account's messages on this computer; search still finds them"
|
|
507
|
+
},
|
|
502
508
|
"--kind": {
|
|
503
509
|
"value": "<kind>",
|
|
504
510
|
"meaning": "the kind of link to record; the command lists the supported task and evidence relations"
|
|
@@ -1293,6 +1299,19 @@
|
|
|
1293
1299
|
"wa": "wa backlog: account privacy"
|
|
1294
1300
|
}
|
|
1295
1301
|
},
|
|
1302
|
+
"account remove": {
|
|
1303
|
+
"in": [],
|
|
1304
|
+
"options": {
|
|
1305
|
+
"--delete-data": "all",
|
|
1306
|
+
"--dry-run": "all",
|
|
1307
|
+
"--keep-data": "all"
|
|
1308
|
+
},
|
|
1309
|
+
"planned": {
|
|
1310
|
+
"max": "account remove: adopt Messenger.accountRemoval (WireCat Desktop removal)",
|
|
1311
|
+
"tg": "account remove: adopt Messenger.accountRemoval (WireCat Desktop removal)",
|
|
1312
|
+
"wa": "account remove: adopt Messenger.accountRemoval (WireCat Desktop removal)"
|
|
1313
|
+
}
|
|
1314
|
+
},
|
|
1296
1315
|
"account sessions": {
|
|
1297
1316
|
"in": "all"
|
|
1298
1317
|
},
|