@wirecat/cli-core 0.605.0 → 0.606.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 +98 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -0
- package/dist/cli/store-settings.js +38 -4
- package/dist/crm/cli/index.js +3 -1
- package/dist/crm/index.d.ts +2 -2
- package/dist/crm/index.js +1 -1
- package/dist/crm/source.d.ts +35 -5
- package/dist/crm/sync.d.ts +15 -7
- package/dist/crm/sync.js +169 -11
- package/dist/domain/crm.d.ts +41 -2
- package/dist/domain/deals.d.ts +5 -2
- package/dist/domain/deals.js +5 -2
- package/dist/domain/relations.d.ts +125 -0
- package/dist/domain/relations.js +107 -0
- package/dist/entities/deal.d.ts +2 -2
- package/dist/entities/deal.js +2 -1
- package/dist/entities/index.d.ts +17 -13
- package/dist/entities/relationship.d.ts +8 -2
- package/dist/entities/relationship.js +8 -2
- package/dist/entities/task-results.d.ts +10 -10
- package/dist/errors/reasons.js +12 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/mail/cli/review.js +20 -6
- package/dist/mail/index.d.ts +1 -1
- package/dist/mail/marks.d.ts +10 -5
- package/dist/mail/marks.js +16 -8
- package/dist/mail/review.d.ts +5 -0
- package/dist/services/link-scorers/scan.js +2 -1
- package/dist/services/link-scorers/shared.js +2 -1
- package/dist/services/project-status/index.js +2 -1
- package/dist/services/stored-project-gathering.js +4 -3
- package/dist/store/exports.d.ts +1 -0
- package/dist/store/exports.js +1 -0
- package/dist/store/index.d.ts +6 -1
- package/dist/store/index.js +1 -0
- package/dist/store/project-transfer/request.d.ts +4 -1
- package/dist/store/project-transfer/schema.d.ts +9 -2
- package/dist/store/project-transfer/schema.js +4 -0
- package/dist/store/project-transfer/snapshot-model.d.ts +8 -2
- package/dist/store/sqlite/crm-settings.d.ts +28 -0
- package/dist/store/sqlite/crm-settings.js +80 -0
- package/dist/store/sqlite/crm.d.ts +42 -2
- package/dist/store/sqlite/crm.js +397 -36
- package/dist/store/sqlite/deals.js +3 -2
- package/dist/store/sqlite/involvement-queue.js +4 -3
- package/dist/store/sqlite/knowledge.d.ts +7 -3
- package/dist/store/sqlite/knowledge.js +43 -31
- package/dist/store/sqlite/link-kinds.d.ts +2 -3
- package/dist/store/sqlite/link-kinds.js +4 -2
- package/dist/store/sqlite/manifest.js +5 -0
- package/dist/store/sqlite/memories.d.ts +1 -1
- package/dist/store/sqlite/memories.js +33 -7
- package/dist/store/sqlite/migrations.generated.js +31 -0
- package/dist/store/sqlite/notes.d.ts +3 -2
- package/dist/store/sqlite/notes.js +23 -6
- package/dist/store/sqlite/organizations.d.ts +8 -0
- package/dist/store/sqlite/organizations.js +14 -0
- package/dist/store/sqlite/person-preparation.d.ts +1 -1
- package/dist/store/sqlite/person-preparation.js +3 -2
- package/dist/store/sqlite/project-transfer/records.js +14 -3
- package/dist/store/sqlite/project-transfer/snapshot.d.ts +4 -1
- package/dist/store/sqlite/project-transfer/snapshot.js +6 -0
- package/dist/store/sqlite/relation-list.d.ts +43 -0
- package/dist/store/sqlite/relation-list.js +133 -0
- package/dist/store/sqlite/relation-proposals.d.ts +28 -6
- package/dist/store/sqlite/relation-proposals.js +134 -10
- package/dist/store/sqlite/relation-reads.d.ts +8 -0
- package/dist/store/sqlite/relation-reads.js +7 -0
- package/dist/store/sqlite/relation-roles.d.ts +26 -0
- package/dist/store/sqlite/relation-roles.js +91 -0
- package/dist/store/sqlite/reported-relations.d.ts +63 -0
- package/dist/store/sqlite/reported-relations.js +132 -0
- package/dist/store/sqlite/schema/link-revisions.d.ts +136 -0
- package/dist/store/sqlite/schema/link-revisions.js +11 -0
- package/dist/store/sqlite/schema/links.d.ts +360 -0
- package/dist/store/sqlite/schema/links.js +32 -0
- package/dist/store/sqlite/schema.d.ts +2 -296
- package/dist/store/sqlite/schema.js +2 -24
- package/dist/store/store.d.ts +3 -0
- package/dist/store/store.js +5 -0
- package/package.json +3 -3
|
@@ -473,6 +473,7 @@ export const pollVotes = sqliteTable("poll_votes", {
|
|
|
473
473
|
unique().on(table.chatId, table.messageExternalId, table.identityId),
|
|
474
474
|
index("poll_votes_by_identity_id").on(table.identityId),
|
|
475
475
|
]);
|
|
476
|
+
export { linkRevisions } from "./schema/link-revisions.js";
|
|
476
477
|
/**
|
|
477
478
|
* One row per field a chat changed, written by a trigger on `chats` in the changing statement's transaction. No foreign
|
|
478
479
|
* keys: an older build purges chats without knowing this table, and a trigger drops a purged chat's rows instead.
|
|
@@ -1781,30 +1782,7 @@ export const canonicalAutoTagClaims = sqliteTable("canonical_auto_tag_claims", {
|
|
|
1781
1782
|
primaryKey({ columns: [table.chatId, table.tagId] }),
|
|
1782
1783
|
index("canonical_auto_tag_claims_by_tag_id").on(table.tagId),
|
|
1783
1784
|
]);
|
|
1784
|
-
export
|
|
1785
|
-
id: integer("id").primaryKey(),
|
|
1786
|
-
fromType: text("from_type").notNull(),
|
|
1787
|
-
fromId: integer("from_id").notNull(),
|
|
1788
|
-
toType: text("to_type"),
|
|
1789
|
-
toId: integer("to_id"),
|
|
1790
|
-
kind: text("kind").notNull(),
|
|
1791
|
-
anchor: text("anchor"),
|
|
1792
|
-
source: text("source").notNull(),
|
|
1793
|
-
targetText: text("target_text"),
|
|
1794
|
-
targetFolded: text("target_folded"),
|
|
1795
|
-
role: text("role"),
|
|
1796
|
-
evidence: text("evidence"),
|
|
1797
|
-
metadata: text("metadata"),
|
|
1798
|
-
confirmed: integer("confirmed").notNull().default(1),
|
|
1799
|
-
createdAt: integer("created_at").notNull(),
|
|
1800
|
-
author: text("author"),
|
|
1801
|
-
updatedAt: integer("updated_at").notNull(),
|
|
1802
|
-
purpose: text("purpose"),
|
|
1803
|
-
}, (table) => [
|
|
1804
|
-
index("links_unresolved").on(table.targetFolded).where(sql `to_id IS NULL`),
|
|
1805
|
-
index("links_by_from_type_from_id").on(table.fromType, table.fromId),
|
|
1806
|
-
index("links_by_to_type_to_id").on(table.toType, table.toId),
|
|
1807
|
-
]);
|
|
1785
|
+
export { links } from "./schema/links.js";
|
|
1808
1786
|
/**
|
|
1809
1787
|
* Every run of `search messages` and `stats messages show`, with the parameters as the caller gave them — never
|
|
1810
1788
|
* a message or a result. A row with a name is a saved search; an identical unnamed run counts on its row.
|
package/dist/store/store.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ import { type StoreOptions } from "./sqlite/open-store.js";
|
|
|
41
41
|
import { type OrdersStore } from "./sqlite/orders.js";
|
|
42
42
|
import { type ProposedActionsStore } from "./sqlite/proposed-actions.js";
|
|
43
43
|
import { type RecordStore } from "./sqlite/records.js";
|
|
44
|
+
import { type RelationsStore } from "./sqlite/reported-relations.js";
|
|
44
45
|
import { type StoreTaskStore } from "./sqlite/tasks.js";
|
|
45
46
|
import { type SyncStore } from "./sync.js";
|
|
46
47
|
import { type TagsStore } from "./tags.js";
|
|
@@ -112,6 +113,8 @@ export interface MessageStore {
|
|
|
112
113
|
readonly deals: DealsStore;
|
|
113
114
|
/** A CRM account's pipelines, deals, leads, contacts and companies, written as the CRM has them. */
|
|
114
115
|
readonly crm: CrmCopies;
|
|
116
|
+
/** Relationships a source account reports, written as a diff that never overrides the owner's. */
|
|
117
|
+
readonly relations: RelationsStore;
|
|
115
118
|
/** The one-time keys behind the buttons of a message that asks the owner to decide a batch. */
|
|
116
119
|
readonly decisionRequests: DecisionRequestStore;
|
|
117
120
|
/** What each import said, by the source's identity; `ingest` (services) is the way in. */
|
package/dist/store/store.js
CHANGED
|
@@ -45,6 +45,7 @@ import { projectAnnotationStoreOver } from "./sqlite/project-transfer/store.js";
|
|
|
45
45
|
import { proposedActionsStoreOver } from "./sqlite/proposed-actions.js";
|
|
46
46
|
import { recordStoreOver } from "./sqlite/records.js";
|
|
47
47
|
import { refSummariesOf } from "./sqlite/ref-summaries.js";
|
|
48
|
+
import { relationsStoreOver } from "./sqlite/reported-relations.js";
|
|
48
49
|
import * as stems from "./sqlite/stems.js";
|
|
49
50
|
import { taskStoreOver } from "./sqlite/tasks.js";
|
|
50
51
|
import { syncStoreOver } from "./sync.js";
|
|
@@ -123,6 +124,7 @@ const storeOver = (context) => {
|
|
|
123
124
|
const orders = once(() => ordersStoreOver(context));
|
|
124
125
|
const deals = once(() => dealsStoreOver(context));
|
|
125
126
|
const crm = once(() => crmCopiesOver(context, accountPeopleOver(context)));
|
|
127
|
+
const relations = once(() => relationsStoreOver(context));
|
|
126
128
|
const decisionRequests = once(() => decisionRequestStoreOver(context));
|
|
127
129
|
const records = once(() => recordStoreOver(context));
|
|
128
130
|
const memories = once(() => memoriesStoreOver(context));
|
|
@@ -240,6 +242,9 @@ const storeOver = (context) => {
|
|
|
240
242
|
get crm() {
|
|
241
243
|
return crm();
|
|
242
244
|
},
|
|
245
|
+
get relations() {
|
|
246
|
+
return relations();
|
|
247
|
+
},
|
|
243
248
|
get decisionRequests() {
|
|
244
249
|
return decisionRequests();
|
|
245
250
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.606.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,8 +15,8 @@
|
|
|
15
15
|
"type": "module",
|
|
16
16
|
"wirecat": {
|
|
17
17
|
"store": {
|
|
18
|
-
"speaks":
|
|
19
|
-
"minCompatible":
|
|
18
|
+
"speaks": 56,
|
|
19
|
+
"minCompatible": 56
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|