ekwo-os 0.21.3 → 0.22.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/README.md +2 -2
- package/dist/assets/expected-objects.json +2 -2
- package/dist/assets/migrations/20261027190000_the_contacts_of_one_party_are_proposed_together.sql +328 -0
- package/dist/assets/migrations/20261027200000_schema_version_0_22_0.sql +38 -0
- package/dist/commands/contact.js +8 -2
- package/dist/commands/contact.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -168,7 +168,7 @@ project reports what was already there and creates nothing a second time.
|
|
|
168
168
|
| `ekwo use <company>` | Picks the company the next commands run on. |
|
|
169
169
|
| `ekwo whoami` | Who you are on which instance, the companies you can see, and what you may do on the one in use. |
|
|
170
170
|
| `ekwo contact add` / `list` | A customer or a supplier, and finding one again. |
|
|
171
|
-
| `ekwo contact duplicates` | The
|
|
171
|
+
| `ekwo contact duplicates` | The contacts that are probably one party, strongest first, through `suggest_duplicate_contacts()`: one row per contact to absorb, the rows of one kept contact being one party, with a score, the evidence — the same VAT or registration number, the same bank account, the words of the name weighed by how few contacts carry them — and the simplest name the group carries, proposed for the kept contact. Writes nothing. |
|
|
172
172
|
| `ekwo contact merge <keep> <absorb>` | One party created twice — two spellings, two imports — joined through `merge_contacts()`: everything that names the second, posted lines and issued documents included, names the first; the first takes the fields it left empty; the second is retired, never deleted, and named by nothing again. By name or id. |
|
|
173
173
|
| `ekwo doc new` / `doc line add` | A draft document — any kind, with `--type` — and one more line on it. A draft books nothing. `ekwo invoice` is the old name of `ekwo doc`, kept as an alias. |
|
|
174
174
|
| `ekwo doc approve <document>` | Approves a draft, as it stands, for an agent to post where agents post in `review`, through `approve_document()`. Signed in as yourself, with `documents.post`; refused to a machine key. A change to the draft afterwards needs another approval. |
|
|
@@ -541,7 +541,7 @@ exactly six fields:
|
|
|
541
541
|
"organization": "My Organisation",
|
|
542
542
|
"country": "<cc>",
|
|
543
543
|
"edition": "community",
|
|
544
|
-
"schema_version": "0.
|
|
544
|
+
"schema_version": "0.22.0",
|
|
545
545
|
"contact_email": "you@example.com"
|
|
546
546
|
}
|
|
547
547
|
```
|
package/dist/assets/migrations/20261027190000_the_contacts_of_one_party_are_proposed_together.sql
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
-- Ekwo OS — the contacts of one party are proposed together (decision 0075,
|
|
2
|
+
-- amended).
|
|
3
|
+
--
|
|
4
|
+
-- `suggest_duplicate_contacts()` (`20261019140000`) answered one row per pair.
|
|
5
|
+
-- Three contacts of one party — "Savoy SRL", "Au Savoy", "Au Savoy (Savoy
|
|
6
|
+
-- SRL)" — are three pairs, so three rows for one act, and the third row
|
|
7
|
+
-- survives the first merge only to be read again. And the row said which
|
|
8
|
+
-- contact to keep but not what to call it: the kept contact keeps its own
|
|
9
|
+
-- name, which is the one the books used most, not the one a person would
|
|
10
|
+
-- write.
|
|
11
|
+
--
|
|
12
|
+
-- **The contacts a chain of pairs joins are one party.** The pairs are found
|
|
13
|
+
-- as before, identifier by identifier and name by name; then the contacts
|
|
14
|
+
-- they join, directly or through a third, are walked into one group. The
|
|
15
|
+
-- group has one contact to keep — the one more ledger lines and documents
|
|
16
|
+
-- name, then the older, then the smaller id, among the whole group — and one
|
|
17
|
+
-- row per other contact: `keep_id` is the group's, `absorb_id` the contact,
|
|
18
|
+
-- and the score and evidence are those of its strongest pair, the pair with
|
|
19
|
+
-- the kept contact first. So "Savoy SRL" and "Au Savoy (Savoy SRL)" are two
|
|
20
|
+
-- rows into "Au Savoy", and a screen shows them as one line.
|
|
21
|
+
--
|
|
22
|
+
-- A contact joined to the kept one only through a third, and carrying a VAT
|
|
23
|
+
-- or registration number the kept one does not, is left out: `merge_contacts()`
|
|
24
|
+
-- would refuse it (`different_identifiers`), and a pair that cannot be merged
|
|
25
|
+
-- is not proposed. It stays proposed with the contact it does pair with once
|
|
26
|
+
-- the rest of the group is merged.
|
|
27
|
+
--
|
|
28
|
+
-- **A name is proposed for the group**, in `proposed_name`: the simplest of
|
|
29
|
+
-- the names the group carries. Each word of a name weighs by how few
|
|
30
|
+
-- contacts of the company carry it (`20261019140000`); a word carried by a
|
|
31
|
+
-- contact outside the group — a legal form, a trade, a town — says nothing
|
|
32
|
+
-- about which party this is. The name proposed is the one with the fewest
|
|
33
|
+
-- such words, then the fewest words, then the shortest, then the kept
|
|
34
|
+
-- contact's own; "Au Savoy" before "Savoy SRL" (`srl` is carried by other
|
|
35
|
+
-- contacts) and before "Au Savoy (Savoy SRL)" (longer). No list of legal
|
|
36
|
+
-- forms: the count is a fact about this company. It is a proposal, written
|
|
37
|
+
-- nowhere: the screen offers it, a person keeps it or writes another, and
|
|
38
|
+
-- the absorbed contacts keep their names, so the party is still found under
|
|
39
|
+
-- any of them.
|
|
40
|
+
--
|
|
41
|
+
-- The columns a reader had — keep_id, absorb_id, score, evidence, because —
|
|
42
|
+
-- keep their names and their meaning; the function is dropped and created
|
|
43
|
+
-- again because a column is added. Order unchanged: strongest row first.
|
|
44
|
+
|
|
45
|
+
drop function if exists suggest_duplicate_contacts(uuid);
|
|
46
|
+
|
|
47
|
+
create or replace function suggest_duplicate_contacts(p_company_id uuid)
|
|
48
|
+
returns table (
|
|
49
|
+
keep_id uuid,
|
|
50
|
+
absorb_id uuid,
|
|
51
|
+
score numeric,
|
|
52
|
+
evidence text,
|
|
53
|
+
because text,
|
|
54
|
+
proposed_name text
|
|
55
|
+
)
|
|
56
|
+
language plpgsql
|
|
57
|
+
stable
|
|
58
|
+
security invoker
|
|
59
|
+
-- Every join below is on a value — a word, a number, an account, an id — and
|
|
60
|
+
-- the pool is the company's contacts, thousands at most: a hash join is right
|
|
61
|
+
-- whatever the statistics of the moment say. Left to an estimate of a handful
|
|
62
|
+
-- of rows, the planner nests loops over two thousand contacts and takes
|
|
63
|
+
-- seconds.
|
|
64
|
+
set enable_nestloop = off
|
|
65
|
+
as $$
|
|
66
|
+
#variable_conflict use_column
|
|
67
|
+
declare
|
|
68
|
+
v_policy matching_policy;
|
|
69
|
+
begin
|
|
70
|
+
v_policy := matching_policy_of(p_company_id);
|
|
71
|
+
|
|
72
|
+
return query
|
|
73
|
+
with recursive
|
|
74
|
+
-- The contacts that may still be merged: active, merged into nobody. Two
|
|
75
|
+
-- sets of words: every word of the name (`tokens`), and those long enough
|
|
76
|
+
-- to count (`words`).
|
|
77
|
+
pool as materialized (
|
|
78
|
+
select c.id, c.name, c.created_at, c.parent_id,
|
|
79
|
+
c.name_words as tokens,
|
|
80
|
+
significant_words(c.name, v_policy.minimum_word_length) as words,
|
|
81
|
+
party_identifier(c.vat_number) as vat,
|
|
82
|
+
party_identifier(c.registration_number) as registration,
|
|
83
|
+
account_key(c.iban) as iban
|
|
84
|
+
from contacts c
|
|
85
|
+
where c.company_id = p_company_id
|
|
86
|
+
and c.active
|
|
87
|
+
and c.merged_into is null
|
|
88
|
+
),
|
|
89
|
+
-- 1. An identifier both carry: a number, a bank account on the contact or
|
|
90
|
+
-- in a learned motif. Joined on its value, never contact by contact.
|
|
91
|
+
keys as (
|
|
92
|
+
select p.id, 'vat_number'::text as kind, p.vat as value, 'the VAT number'::text as what
|
|
93
|
+
from pool p where p.vat is not null
|
|
94
|
+
union
|
|
95
|
+
select p.id, 'registration_number', p.registration, 'the registration number'
|
|
96
|
+
from pool p where p.registration is not null
|
|
97
|
+
union
|
|
98
|
+
select p.id, 'account', p.iban, 'the bank account'
|
|
99
|
+
from pool p where p.iban is not null
|
|
100
|
+
union
|
|
101
|
+
select p.id, 'account', account_key(m.value), 'the bank account'
|
|
102
|
+
from contact_patterns m
|
|
103
|
+
join pool p on p.id = m.contact_id
|
|
104
|
+
where m.company_id = p_company_id
|
|
105
|
+
and m.active
|
|
106
|
+
and m.kind = 'counterparty_account'
|
|
107
|
+
and account_key(m.value) is not null
|
|
108
|
+
),
|
|
109
|
+
by_key as (
|
|
110
|
+
select a.id as lo, b.id as hi, a.kind, 1.000::numeric as score,
|
|
111
|
+
format('%s and %s carry %s %s', pa.name, pb.name, a.what, a.value) as because
|
|
112
|
+
from keys a
|
|
113
|
+
join keys b on b.kind = a.kind and b.value = a.value and b.id > a.id
|
|
114
|
+
join pool pa on pa.id = a.id
|
|
115
|
+
join pool pb on pb.id = b.id
|
|
116
|
+
),
|
|
117
|
+
-- 2. The name. How many contacts carry each word, at any length: what a
|
|
118
|
+
-- word weighs.
|
|
119
|
+
reach as (
|
|
120
|
+
select u.word, count(*) as contacts
|
|
121
|
+
from pool p cross join lateral unnest(p.tokens) as u(word)
|
|
122
|
+
group by u.word
|
|
123
|
+
),
|
|
124
|
+
holders as (
|
|
125
|
+
select p.id, u.word
|
|
126
|
+
from pool p cross join lateral unnest(p.words) as u(word)
|
|
127
|
+
),
|
|
128
|
+
rarest as (
|
|
129
|
+
select distinct on (h.id) h.id, h.word
|
|
130
|
+
from holders h join reach r on r.word = h.word
|
|
131
|
+
order by h.id, r.contacts, h.word
|
|
132
|
+
),
|
|
133
|
+
-- Directed: `a` is the name read as the shorter, and its rarest
|
|
134
|
+
-- significant word is in the name of `b`.
|
|
135
|
+
name_pairs as (
|
|
136
|
+
select r.id as a_id, h.id as b_id
|
|
137
|
+
from rarest r
|
|
138
|
+
join holders h on h.word = r.word and h.id <> r.id
|
|
139
|
+
union
|
|
140
|
+
-- The same name with no word long enough to count still names one party.
|
|
141
|
+
select a.id, b.id
|
|
142
|
+
from pool a
|
|
143
|
+
join pool b on lower(trim(b.name)) = lower(trim(a.name)) and b.id <> a.id
|
|
144
|
+
),
|
|
145
|
+
-- What the two share — the significant words of `a` in `b` — and what only
|
|
146
|
+
-- one of them says — every word of `a` missing from `b`, the significant
|
|
147
|
+
-- words of `b` missing from `a` — each word at 1 over the contacts that
|
|
148
|
+
-- carry it.
|
|
149
|
+
weighed as (
|
|
150
|
+
select n.a_id, n.b_id,
|
|
151
|
+
coalesce(sum(1::numeric / r.contacts)
|
|
152
|
+
filter (where s.side = 'a' and s.shared
|
|
153
|
+
and length(s.word) >= v_policy.minimum_word_length), 0) as shared,
|
|
154
|
+
coalesce(sum(1::numeric / r.contacts) filter (where not s.shared), 0) as apart
|
|
155
|
+
from name_pairs n
|
|
156
|
+
join pool a on a.id = n.a_id
|
|
157
|
+
join pool b on b.id = n.b_id
|
|
158
|
+
cross join lateral (
|
|
159
|
+
select 'a'::text as side, u.word, u.word = any (b.tokens) as shared
|
|
160
|
+
from unnest(a.tokens) as u(word)
|
|
161
|
+
union all
|
|
162
|
+
select 'b', u.word, u.word = any (a.tokens)
|
|
163
|
+
from unnest(b.words) as u(word)
|
|
164
|
+
) s
|
|
165
|
+
join reach r on r.word = s.word
|
|
166
|
+
group by n.a_id, n.b_id
|
|
167
|
+
),
|
|
168
|
+
agreeing as (
|
|
169
|
+
select n.a_id, n.b_id
|
|
170
|
+
from name_pairs n
|
|
171
|
+
join pool a on a.id = n.a_id
|
|
172
|
+
join pool b on b.id = n.b_id
|
|
173
|
+
left join weighed w on w.a_id = n.a_id and w.b_id = n.b_id
|
|
174
|
+
where lower(trim(a.name)) = lower(trim(b.name))
|
|
175
|
+
or (w.shared > 0 and w.apart <= w.shared)
|
|
176
|
+
),
|
|
177
|
+
named as (
|
|
178
|
+
select n.a_id, n.b_id, a.name as a_name, b.name as b_name, a.words, b.words as b_words,
|
|
179
|
+
name_agreement(a.name, a.words, b.name, b.words) as agreement,
|
|
180
|
+
-- How many contacts the name of `a` agrees with, as
|
|
181
|
+
-- contact_candidates() counts what a text reaches.
|
|
182
|
+
count(*) over (partition by n.a_id) as reached
|
|
183
|
+
from agreeing n
|
|
184
|
+
join pool a on a.id = n.a_id
|
|
185
|
+
join pool b on b.id = n.b_id
|
|
186
|
+
),
|
|
187
|
+
-- One sentence a pair, from the direction that says it best: the higher
|
|
188
|
+
-- score, then the name whose words are all in the other, then the shorter.
|
|
189
|
+
by_name as (
|
|
190
|
+
select distinct on (least(n.a_id, n.b_id), greatest(n.a_id, n.b_id))
|
|
191
|
+
least(n.a_id, n.b_id) as lo, greatest(n.a_id, n.b_id) as hi, 'name'::text as kind,
|
|
192
|
+
name_among_several(n.agreement, n.reached) as score,
|
|
193
|
+
case
|
|
194
|
+
when n.agreement >= 0.950 then format('%s and %s carry the same name', n.a_name, n.b_name)
|
|
195
|
+
when n.words @> n.b_words and n.words <@ n.b_words
|
|
196
|
+
then format('%s and %s carry the same words: %s', n.a_name, n.b_name,
|
|
197
|
+
array_to_string(array(select unnest(n.words) order by 1), ', '))
|
|
198
|
+
when n.words <@ n.b_words then format('every word of %s is in %s', n.a_name, n.b_name)
|
|
199
|
+
else format('%s and %s share %s, and what only one of them carries is common', n.a_name, n.b_name,
|
|
200
|
+
array_to_string(array(select unnest(n.words) intersect select unnest(n.b_words) order by 1), ', '))
|
|
201
|
+
end
|
|
202
|
+
|| case when n.reached > 1 and n.agreement < 0.950
|
|
203
|
+
then format('; the words of %s are in the names of %s contacts', n.a_name, n.reached)
|
|
204
|
+
else '' end as because
|
|
205
|
+
from named n
|
|
206
|
+
where n.agreement is not null
|
|
207
|
+
and name_among_several(n.agreement, n.reached) >= v_policy.name_threshold
|
|
208
|
+
order by least(n.a_id, n.b_id), greatest(n.a_id, n.b_id),
|
|
209
|
+
name_among_several(n.agreement, n.reached) desc,
|
|
210
|
+
(n.words <@ n.b_words) desc, cardinality(n.words), n.a_name
|
|
211
|
+
),
|
|
212
|
+
-- The strongest sentence of each kind of evidence, for each pair.
|
|
213
|
+
facts as (
|
|
214
|
+
select distinct on (e.lo, e.hi, e.kind) e.lo, e.hi, e.kind, e.score, e.because,
|
|
215
|
+
array_position(array['vat_number', 'registration_number', 'account', 'name'], e.kind) as rank
|
|
216
|
+
from (select * from by_key union all select * from by_name) e
|
|
217
|
+
order by e.lo, e.hi, e.kind, e.score desc, e.because
|
|
218
|
+
),
|
|
219
|
+
pairs as (
|
|
220
|
+
select e.lo, e.hi, max(e.score) as score,
|
|
221
|
+
string_agg(e.kind, ',' order by e.score desc, e.rank) as evidence,
|
|
222
|
+
string_agg(e.because, '; ' order by e.score desc, e.rank) as because,
|
|
223
|
+
count(*) as kinds
|
|
224
|
+
from facts e
|
|
225
|
+
join pool a on a.id = e.lo
|
|
226
|
+
join pool b on b.id = e.hi
|
|
227
|
+
-- What merge_contacts() would refuse, and a contact with its own branch.
|
|
228
|
+
where not (a.vat is not null and b.vat is not null and a.vat <> b.vat)
|
|
229
|
+
and not (a.registration is not null and b.registration is not null and a.registration <> b.registration)
|
|
230
|
+
and a.parent_id is distinct from b.id
|
|
231
|
+
and b.parent_id is distinct from a.id
|
|
232
|
+
group by e.lo, e.hi
|
|
233
|
+
),
|
|
234
|
+
-- 3. The group. The contacts the pairs join, directly or through a third,
|
|
235
|
+
-- walked from each contact along the pairs; a contact's group is named
|
|
236
|
+
-- by the smallest id it reaches (uuid has no min: compared as text). `union`, not `union all`: a contact
|
|
237
|
+
-- reached again is not walked again, so a ring of pairs ends.
|
|
238
|
+
edges as (
|
|
239
|
+
select x.lo as id, x.hi as other from pairs x
|
|
240
|
+
union all
|
|
241
|
+
select x.hi, x.lo from pairs x
|
|
242
|
+
),
|
|
243
|
+
walk(id, reached) as (
|
|
244
|
+
select e.id, e.id from edges e
|
|
245
|
+
union
|
|
246
|
+
select w.id, e.other
|
|
247
|
+
from walk w
|
|
248
|
+
join edges e on e.id = w.reached
|
|
249
|
+
),
|
|
250
|
+
grouped as (
|
|
251
|
+
select w.id, min(w.reached::text)::uuid as root
|
|
252
|
+
from walk w
|
|
253
|
+
group by w.id
|
|
254
|
+
),
|
|
255
|
+
-- What the books name each contact of a group by: its ledger lines and its
|
|
256
|
+
-- documents.
|
|
257
|
+
activity as (
|
|
258
|
+
select p.id, p.created_at,
|
|
259
|
+
(select count(*) from entry_lines l where l.contact_id = p.id and l.company_id = p_company_id)
|
|
260
|
+
+ (select count(*) from documents d where d.contact_id = p.id and d.company_id = p_company_id) as uses
|
|
261
|
+
from pool p
|
|
262
|
+
where p.id in (select g.id from grouped g)
|
|
263
|
+
),
|
|
264
|
+
kept as (
|
|
265
|
+
select distinct on (g.root) g.root, g.id as keep_id
|
|
266
|
+
from grouped g
|
|
267
|
+
join activity a on a.id = g.id
|
|
268
|
+
order by g.root, a.uses desc, a.created_at, g.id
|
|
269
|
+
),
|
|
270
|
+
-- 4. The name proposed for the group: each word of each name, with how many
|
|
271
|
+
-- contacts outside the group carry it.
|
|
272
|
+
carried as (
|
|
273
|
+
select g.root, g.id, u.word,
|
|
274
|
+
r.contacts - count(*) over (partition by g.root, u.word) as outside
|
|
275
|
+
from grouped g
|
|
276
|
+
join pool p on p.id = g.id
|
|
277
|
+
cross join lateral unnest(p.tokens) as u(word)
|
|
278
|
+
join reach r on r.word = u.word
|
|
279
|
+
),
|
|
280
|
+
simplest as (
|
|
281
|
+
select distinct on (c.root) c.root, p.name
|
|
282
|
+
from (
|
|
283
|
+
select c.root, c.id,
|
|
284
|
+
count(*) filter (where c.outside > 0) as common,
|
|
285
|
+
count(*) as words
|
|
286
|
+
from carried c
|
|
287
|
+
group by c.root, c.id
|
|
288
|
+
) c
|
|
289
|
+
join pool p on p.id = c.id
|
|
290
|
+
join kept k on k.root = c.root
|
|
291
|
+
order by c.root, c.common, c.words, length(p.name), (c.id = k.keep_id) desc, p.name
|
|
292
|
+
),
|
|
293
|
+
-- 5. One row per contact absorbed, with its strongest pair — the pair with
|
|
294
|
+
-- the kept contact first — and the name proposed for the group.
|
|
295
|
+
sides as (
|
|
296
|
+
select x.lo as id, x.hi as other, x.score, x.evidence, x.because, x.kinds from pairs x
|
|
297
|
+
union all
|
|
298
|
+
select x.hi, x.lo, x.score, x.evidence, x.because, x.kinds from pairs x
|
|
299
|
+
),
|
|
300
|
+
told as (
|
|
301
|
+
select distinct on (g.id) k.keep_id, g.id as absorb_id, g.root, s.score, s.evidence, s.because, s.kinds
|
|
302
|
+
from grouped g
|
|
303
|
+
join kept k on k.root = g.root
|
|
304
|
+
join sides s on s.id = g.id
|
|
305
|
+
where g.id <> k.keep_id
|
|
306
|
+
order by g.id, (s.other = k.keep_id) desc, s.score desc, s.kinds desc, s.because
|
|
307
|
+
)
|
|
308
|
+
select t.keep_id, t.absorb_id, t.score, t.evidence, t.because,
|
|
309
|
+
coalesce(s.name, pk.name)
|
|
310
|
+
from told t
|
|
311
|
+
join pool pa on pa.id = t.absorb_id
|
|
312
|
+
join pool pk on pk.id = t.keep_id
|
|
313
|
+
left join simplest s on s.root = t.root
|
|
314
|
+
-- What merge_contacts() would refuse of a contact and the kept one, joined
|
|
315
|
+
-- through a third.
|
|
316
|
+
where not (pa.vat is not null and pk.vat is not null and pa.vat <> pk.vat)
|
|
317
|
+
and not (pa.registration is not null and pk.registration is not null and pa.registration <> pk.registration)
|
|
318
|
+
and pa.parent_id is distinct from pk.id
|
|
319
|
+
and pk.parent_id is distinct from pa.id
|
|
320
|
+
order by t.score desc, t.kinds desc, t.because;
|
|
321
|
+
end;
|
|
322
|
+
$$;
|
|
323
|
+
|
|
324
|
+
comment on function suggest_duplicate_contacts(uuid) is
|
|
325
|
+
'The contacts of a company that are probably one party (decision 0075): one row per contact to absorb, strongest first — keep_id, the contact of its group the most ledger lines and documents name (then the older), absorb_id, score from 0 to 1, evidence (the kinds, strongest first, comma-separated: vat_number, registration_number, account, name), because (the evidence in sentences) and proposed_name, the simplest name the group carries (the fewest words carried by contacts outside the group, then the fewest words, then the shortest). The pairs are found on the same VAT or registration number (party_identifier()), the same bank account on the contact or in a learned motif (account_key()), both scoring 1, and by name, each word weighing 1 over the contacts of the company that carry it, scored as contact_candidates() scores a name; the contacts a chain of pairs joins are one group, with one contact to keep. Rows of one group share their keep_id. A pair across companies, with two different VAT or registration numbers, or of a contact and its own parent is never proposed. It writes nothing and decides nothing; merge_contacts() joins a pair a person chose, and the name proposed is written only by the person.';
|
|
326
|
+
|
|
327
|
+
revoke execute on function suggest_duplicate_contacts(uuid) from public, anon;
|
|
328
|
+
grant execute on function suggest_duplicate_contacts(uuid) to authenticated, service_role;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
-- Ekwo OS — the schema this release defines is 0.22.0.
|
|
2
|
+
--
|
|
3
|
+
-- `ekwo_schema_version()` is the one place the number lives, and a migration
|
|
4
|
+
-- is the only thing that moves it. A database then answers for the files it
|
|
5
|
+
-- has actually run rather than for what somebody believed it had run: the
|
|
6
|
+
-- column default and `init_instance()` both call this function, so a fresh
|
|
7
|
+
-- install records the new number without a second edit, and `ekwo migrate`
|
|
8
|
+
-- reads it back onto `instance.schema_version` for a database that was
|
|
9
|
+
-- installed at an older one.
|
|
10
|
+
--
|
|
11
|
+
-- Between 0.21.0 and here `suggest_duplicate_contacts()` proposes the
|
|
12
|
+
-- contacts of one party together — one contact kept for the whole group, one
|
|
13
|
+
-- row per other contact — and answers with one more column, `proposed_name`,
|
|
14
|
+
-- the simplest name the group carries
|
|
15
|
+
-- (`20261027190000_the_contacts_of_one_party_are_proposed_together`).
|
|
16
|
+
--
|
|
17
|
+
-- The floor of `ekwo-os`, `@ekwo-ai/core` and `@ekwo-ai/mcp` stays at 0.19.0:
|
|
18
|
+
-- the migration only adds. The function keeps its name and its arguments, the
|
|
19
|
+
-- columns it answered with keep theirs, and a reader on an older schema takes
|
|
20
|
+
-- the name of the kept contact where `proposed_name` is not answered.
|
|
21
|
+
|
|
22
|
+
create or replace function ekwo_schema_version()
|
|
23
|
+
returns text
|
|
24
|
+
language sql
|
|
25
|
+
immutable
|
|
26
|
+
as $$
|
|
27
|
+
select '0.22.0'::text;
|
|
28
|
+
$$;
|
|
29
|
+
|
|
30
|
+
comment on function ekwo_schema_version() is
|
|
31
|
+
'Schema version of the installed release. Bumped by a migration, never by hand.';
|
|
32
|
+
|
|
33
|
+
-- `create or replace` keeps the privileges the function already had, and the
|
|
34
|
+
-- revoke is what every migration of this directory ends with: a function that
|
|
35
|
+
-- comes out with the built-in default is published by Supabase as an
|
|
36
|
+
-- anonymous RPC endpoint.
|
|
37
|
+
revoke execute on all functions in schema public from public;
|
|
38
|
+
grant execute on function ekwo_schema_version() to authenticated, service_role;
|
package/dist/commands/contact.js
CHANGED
|
@@ -97,8 +97,14 @@ async function duplicates(args, deps) {
|
|
|
97
97
|
if (result.pairs.length === 0)
|
|
98
98
|
note(dim('None.'));
|
|
99
99
|
else {
|
|
100
|
-
table([{ title: 'keep' }, { title: 'absorb' }, { title: 'score', align: 'right' }, { title: 'evidence' }], result.pairs.map((p) => [
|
|
101
|
-
|
|
100
|
+
table([{ title: 'keep' }, { title: 'absorb' }, { title: 'score', align: 'right' }, { title: 'evidence' }, { title: 'name proposed' }], result.pairs.map((p) => [
|
|
101
|
+
p.keep_name,
|
|
102
|
+
p.absorb_name,
|
|
103
|
+
String(p.score),
|
|
104
|
+
p.evidence.join(', '),
|
|
105
|
+
p.proposed_name === p.keep_name ? '' : p.proposed_name,
|
|
106
|
+
]));
|
|
107
|
+
note(dim('The rows of one kept contact are one party. ekwo contact merge <keep> <absorb> joins a pair; --json gives the ids and the evidence in sentences.'));
|
|
102
108
|
}
|
|
103
109
|
return 0;
|
|
104
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.js","sourceRoot":"","sources":["../../src/commands/contact.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,wBAAwB,GAIzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,UAAU,EAAmB,MAAM,YAAY,CAAC;AACrG,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAkB,MAAM,aAAa,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAElE,MAAM,SAAS,GAAG,CAAC,GAAG,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS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,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,IAAI,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC,CAAC;;QACpE,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACzG,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,IAAI,CAAC,GAAG,CAAC,qCAAqC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACrH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACvB,OAAO,CAAC,CAAC;AACX,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ekwo-os",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Install and operate Ekwo OS on your own Supabase project: npx ekwo-os init.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accounting",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@ekwo-ai/core": "^0.
|
|
53
|
+
"@ekwo-ai/core": "^0.22.0",
|
|
54
54
|
"postgres": "^3.4.5"
|
|
55
55
|
}
|
|
56
56
|
}
|