@hasna/contacts 0.6.15 → 0.6.17
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/LICENSE +79 -69
- package/dist/cli/index.js +3 -3
- package/dist/index.js +3 -3
- package/dist/lib/import.d.ts.map +1 -1
- package/dist/mcp/index.js +6 -6
- package/dist/mcp/tools.d.ts +4 -4
- package/dist/server/index.js +2 -2
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -32,34 +32,36 @@
|
|
|
32
32
|
not limited to compiled object code, generated documentation,
|
|
33
33
|
and conversions to other media types.
|
|
34
34
|
|
|
35
|
-
"Work" shall mean the work of authorship
|
|
36
|
-
the License, as indicated by a
|
|
37
|
-
included in or attached to the work
|
|
38
|
-
in the Appendix below).
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
39
|
|
|
40
40
|
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
41
|
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
or
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
63
65
|
|
|
64
66
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
65
67
|
this License, each Contributor hereby grants to You a perpetual,
|
|
@@ -75,13 +77,14 @@
|
|
|
75
77
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
76
78
|
where such license applies only to those patent claims licensable
|
|
77
79
|
by such Contributor that are necessarily infringed by their
|
|
78
|
-
Contribution(s) alone or by
|
|
79
|
-
with the Work to which such Contribution(s)
|
|
80
|
-
institute patent litigation against any entity (including a
|
|
81
|
-
or counterclaim in a lawsuit) alleging that the Work
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
85
88
|
|
|
86
89
|
4. Redistribution. You may reproduce and distribute copies of the
|
|
87
90
|
Work or Derivative Works thereof in any medium, with or without
|
|
@@ -94,32 +97,35 @@
|
|
|
94
97
|
(b) You must cause any modified files to carry prominent notices
|
|
95
98
|
stating that You changed the files; and
|
|
96
99
|
|
|
97
|
-
(c) You must retain, in the Source form of any Derivative
|
|
98
|
-
|
|
99
|
-
notices from the Source form of the Work,
|
|
100
|
-
notices that do not pertain to any part of
|
|
101
|
-
Works; and
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
102
105
|
|
|
103
106
|
(d) If the Work includes a "NOTICE" text file as part of its
|
|
104
|
-
distribution, then
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
the
|
|
109
|
-
Derivative Works;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
123
129
|
|
|
124
130
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
125
131
|
any Contribution intentionally submitted for inclusion in the Work
|
|
@@ -138,34 +144,38 @@
|
|
|
138
144
|
agreed to in writing, Licensor provides the Work (and each
|
|
139
145
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
140
146
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
141
|
-
implied, including, without limitation, any conditions
|
|
142
|
-
TITLE,
|
|
143
|
-
You are solely responsible for determining the
|
|
144
|
-
using or
|
|
145
|
-
Your exercise of permissions under this License.
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
146
152
|
|
|
147
153
|
8. Limitation of Liability. In no event and under no legal theory,
|
|
148
154
|
whether in tort (including negligence), contract, or otherwise,
|
|
149
155
|
unless required by applicable law (such as deliberate and grossly
|
|
150
156
|
negligent acts) or agreed to in writing, shall any Contributor be
|
|
151
157
|
liable to You for damages, including any direct, indirect, special,
|
|
152
|
-
incidental, or
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
153
159
|
result of this License or out of the use or inability to use the
|
|
154
|
-
Work (
|
|
155
|
-
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
156
164
|
|
|
157
165
|
9. Accepting Warranty or Additional Liability. While redistributing
|
|
158
166
|
the Work or Derivative Works thereof, You may choose to offer,
|
|
159
167
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
160
168
|
or other liability obligations and/or rights consistent with this
|
|
161
|
-
License. However, in accepting such obligations, You may
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
165
175
|
|
|
166
176
|
END OF TERMS AND CONDITIONS
|
|
167
177
|
|
|
168
|
-
Copyright
|
|
178
|
+
Copyright 2026 hasna
|
|
169
179
|
|
|
170
180
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
171
181
|
you may not use this file except in compliance with the License.
|
package/dist/cli/index.js
CHANGED
|
@@ -13340,7 +13340,7 @@ function autoLinkContactToCompany(contactId, db) {
|
|
|
13340
13340
|
const row = d.query(`SELECT * FROM contacts WHERE id = ?`).get(contactId);
|
|
13341
13341
|
if (!row || row.company_id)
|
|
13342
13342
|
return null;
|
|
13343
|
-
const emailRow = d.query(`SELECT address FROM emails WHERE contact_id = ?
|
|
13343
|
+
const emailRow = d.query(`SELECT address FROM emails WHERE contact_id = ? LIMIT 1`).get(contactId);
|
|
13344
13344
|
if (!emailRow)
|
|
13345
13345
|
return null;
|
|
13346
13346
|
const domain = emailRow.address.split("@")[1];
|
|
@@ -14023,8 +14023,8 @@ function parseVcfBlock(block) {
|
|
|
14023
14023
|
return contact;
|
|
14024
14024
|
}
|
|
14025
14025
|
function decodeVcfValue(val) {
|
|
14026
|
-
return val.replace(/\\n/g, `
|
|
14027
|
-
`).replace(/\\,/g, ",").replace(/\\;/g, ";").replace(
|
|
14026
|
+
return val.replace(/\\\\/g, "\x00").replace(/\\n/g, `
|
|
14027
|
+
`).replace(/\\,/g, ",").replace(/\\;/g, ";").replace(/\x00/g, "\\");
|
|
14028
14028
|
}
|
|
14029
14029
|
function detectPlatform(url) {
|
|
14030
14030
|
const lower = url.toLowerCase();
|
package/dist/index.js
CHANGED
|
@@ -10647,7 +10647,7 @@ function autoLinkContactToCompany(contactId, db) {
|
|
|
10647
10647
|
const row = d.query(`SELECT * FROM contacts WHERE id = ?`).get(contactId);
|
|
10648
10648
|
if (!row || row.company_id)
|
|
10649
10649
|
return null;
|
|
10650
|
-
const emailRow = d.query(`SELECT address FROM emails WHERE contact_id = ?
|
|
10650
|
+
const emailRow = d.query(`SELECT address FROM emails WHERE contact_id = ? LIMIT 1`).get(contactId);
|
|
10651
10651
|
if (!emailRow)
|
|
10652
10652
|
return null;
|
|
10653
10653
|
const domain = emailRow.address.split("@")[1];
|
|
@@ -12608,8 +12608,8 @@ function parseVcfBlock(block) {
|
|
|
12608
12608
|
return contact;
|
|
12609
12609
|
}
|
|
12610
12610
|
function decodeVcfValue(val) {
|
|
12611
|
-
return val.replace(/\\n/g, `
|
|
12612
|
-
`).replace(/\\,/g, ",").replace(/\\;/g, ";").replace(
|
|
12611
|
+
return val.replace(/\\\\/g, "\x00").replace(/\\n/g, `
|
|
12612
|
+
`).replace(/\\,/g, ",").replace(/\\;/g, ";").replace(/\x00/g, "\\");
|
|
12613
12613
|
}
|
|
12614
12614
|
function detectPlatform(url) {
|
|
12615
12615
|
const lower = url.toLowerCase();
|
package/dist/lib/import.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/lib/import.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,kBAAkB,EASnB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAgHnC,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAGhE;
|
|
1
|
+
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/lib/import.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,kBAAkB,EASnB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAgHnC,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAGhE;AAuND,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAkD/D;AAUD,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,EAC9B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAa/B"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -11293,7 +11293,7 @@ function autoLinkContactToCompany(contactId, db) {
|
|
|
11293
11293
|
const row = d.query(`SELECT * FROM contacts WHERE id = ?`).get(contactId);
|
|
11294
11294
|
if (!row || row.company_id)
|
|
11295
11295
|
return null;
|
|
11296
|
-
const emailRow = d.query(`SELECT address FROM emails WHERE contact_id = ?
|
|
11296
|
+
const emailRow = d.query(`SELECT address FROM emails WHERE contact_id = ? LIMIT 1`).get(contactId);
|
|
11297
11297
|
if (!emailRow)
|
|
11298
11298
|
return null;
|
|
11299
11299
|
const domain = emailRow.address.split("@")[1];
|
|
@@ -12211,8 +12211,8 @@ function parseVcfBlock(block) {
|
|
|
12211
12211
|
return contact;
|
|
12212
12212
|
}
|
|
12213
12213
|
function decodeVcfValue(val) {
|
|
12214
|
-
return val.replace(/\\n/g, `
|
|
12215
|
-
`).replace(/\\,/g, ",").replace(/\\;/g, ";").replace(
|
|
12214
|
+
return val.replace(/\\\\/g, "\x00").replace(/\\n/g, `
|
|
12215
|
+
`).replace(/\\,/g, ",").replace(/\\;/g, ";").replace(/\x00/g, "\\");
|
|
12216
12216
|
}
|
|
12217
12217
|
function detectPlatform(url) {
|
|
12218
12218
|
const lower = url.toLowerCase();
|
|
@@ -21662,7 +21662,7 @@ var TOOL_DEFINITIONS = [
|
|
|
21662
21662
|
title: { type: "string" },
|
|
21663
21663
|
contact_id: { type: "string" },
|
|
21664
21664
|
company_id: { type: "string" },
|
|
21665
|
-
stage: { type: "string", enum: ["
|
|
21665
|
+
stage: { type: "string", enum: ["lead", "qualified", "proposal", "negotiation", "won", "lost", "cancelled"], description: "Deal stage (default: lead)" },
|
|
21666
21666
|
value_usd: { type: "number" },
|
|
21667
21667
|
currency: { type: "string" },
|
|
21668
21668
|
close_date: { type: "string", description: "Expected close date (YYYY-MM-DD)" },
|
|
@@ -21686,7 +21686,7 @@ var TOOL_DEFINITIONS = [
|
|
|
21686
21686
|
inputSchema: {
|
|
21687
21687
|
type: "object",
|
|
21688
21688
|
properties: {
|
|
21689
|
-
stage: { type: "string", enum: ["
|
|
21689
|
+
stage: { type: "string", enum: ["lead", "qualified", "proposal", "negotiation", "won", "lost", "cancelled"] },
|
|
21690
21690
|
contact_id: { type: "string" },
|
|
21691
21691
|
company_id: { type: "string" }
|
|
21692
21692
|
}
|
|
@@ -21700,7 +21700,7 @@ var TOOL_DEFINITIONS = [
|
|
|
21700
21700
|
properties: {
|
|
21701
21701
|
id: { type: "string" },
|
|
21702
21702
|
title: { type: "string" },
|
|
21703
|
-
stage: { type: "string", enum: ["
|
|
21703
|
+
stage: { type: "string", enum: ["lead", "qualified", "proposal", "negotiation", "won", "lost", "cancelled"] },
|
|
21704
21704
|
value_usd: { type: "number" },
|
|
21705
21705
|
close_date: { type: "string" },
|
|
21706
21706
|
notes: { type: "string" }
|
package/dist/mcp/tools.d.ts
CHANGED
|
@@ -2168,8 +2168,8 @@ export declare const TOOL_DEFINITIONS: readonly [{
|
|
|
2168
2168
|
};
|
|
2169
2169
|
readonly stage: {
|
|
2170
2170
|
readonly type: "string";
|
|
2171
|
-
readonly enum: readonly ["
|
|
2172
|
-
readonly description: "Deal stage (default:
|
|
2171
|
+
readonly enum: readonly ["lead", "qualified", "proposal", "negotiation", "won", "lost", "cancelled"];
|
|
2172
|
+
readonly description: "Deal stage (default: lead)";
|
|
2173
2173
|
};
|
|
2174
2174
|
readonly value_usd: {
|
|
2175
2175
|
readonly type: "number";
|
|
@@ -2207,7 +2207,7 @@ export declare const TOOL_DEFINITIONS: readonly [{
|
|
|
2207
2207
|
readonly properties: {
|
|
2208
2208
|
readonly stage: {
|
|
2209
2209
|
readonly type: "string";
|
|
2210
|
-
readonly enum: readonly ["
|
|
2210
|
+
readonly enum: readonly ["lead", "qualified", "proposal", "negotiation", "won", "lost", "cancelled"];
|
|
2211
2211
|
};
|
|
2212
2212
|
readonly contact_id: {
|
|
2213
2213
|
readonly type: "string";
|
|
@@ -2231,7 +2231,7 @@ export declare const TOOL_DEFINITIONS: readonly [{
|
|
|
2231
2231
|
};
|
|
2232
2232
|
readonly stage: {
|
|
2233
2233
|
readonly type: "string";
|
|
2234
|
-
readonly enum: readonly ["
|
|
2234
|
+
readonly enum: readonly ["lead", "qualified", "proposal", "negotiation", "won", "lost", "cancelled"];
|
|
2235
2235
|
};
|
|
2236
2236
|
readonly value_usd: {
|
|
2237
2237
|
readonly type: "number";
|
package/dist/server/index.js
CHANGED
|
@@ -11010,8 +11010,8 @@ function parseVcfBlock(block) {
|
|
|
11010
11010
|
return contact;
|
|
11011
11011
|
}
|
|
11012
11012
|
function decodeVcfValue(val) {
|
|
11013
|
-
return val.replace(/\\n/g, `
|
|
11014
|
-
`).replace(/\\,/g, ",").replace(/\\;/g, ";").replace(
|
|
11013
|
+
return val.replace(/\\\\/g, "\x00").replace(/\\n/g, `
|
|
11014
|
+
`).replace(/\\,/g, ",").replace(/\\;/g, ";").replace(/\x00/g, "\\");
|
|
11015
11015
|
}
|
|
11016
11016
|
function detectPlatform(url) {
|
|
11017
11017
|
const lower = url.toLowerCase();
|