@hasna/contacts 0.6.15 → 0.6.16
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 +13 -176
- 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
|
@@ -1,180 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Copyright 2026 Hasna, Inc.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship made available under
|
|
36
|
-
the License, as indicated by a copyright notice that is
|
|
37
|
-
included in or attached to the work (an example is provided
|
|
38
|
-
in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other
|
|
43
|
-
transformations represent, as a whole, an original work of authorship.
|
|
44
|
-
For the purposes of this License, Derivative Works shall not include
|
|
45
|
-
works that remain separable from, or merely link (or bind by name)
|
|
46
|
-
to the interfaces of, the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
49
|
-
in the Work by the copyright owner or by an Individual or Legal Entity
|
|
50
|
-
authorized to submit on behalf of the copyright owner. For the purposes
|
|
51
|
-
of this definition, "submitted" means any form of electronic, verbal,
|
|
52
|
-
or written communication sent to the Licensor or its representatives,
|
|
53
|
-
including but not limited to communication on electronic mailing lists,
|
|
54
|
-
source code control systems, and issue tracking systems that are managed
|
|
55
|
-
by, or on behalf of, the Licensor for the purpose of documenting and
|
|
56
|
-
discussing improvements to the Work, but excluding communication that is
|
|
57
|
-
conspicuously marked or designated in writing by the copyright owner as
|
|
58
|
-
"Not a Contribution."
|
|
59
|
-
|
|
60
|
-
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
61
|
-
whom a Contribution has been received by the Licensor and included
|
|
62
|
-
within the Work.
|
|
63
|
-
|
|
64
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
65
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
66
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
67
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
68
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
69
|
-
Work and such Derivative Works in Source or Object form.
|
|
70
|
-
|
|
71
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
72
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
73
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
74
|
-
(except as stated in this section) patent license to make, have made,
|
|
75
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
76
|
-
where such license applies only to those patent claims licensable
|
|
77
|
-
by such Contributor that are necessarily infringed by their
|
|
78
|
-
Contribution(s) alone or by the combination of their Contribution(s)
|
|
79
|
-
with the Work to which such Contribution(s) were submitted. If You
|
|
80
|
-
institute patent litigation against any entity (including a cross-claim
|
|
81
|
-
or counterclaim in a lawsuit) alleging that the Work or any claim
|
|
82
|
-
constituting direct or indirect patent infringement, then any patent
|
|
83
|
-
licenses granted to You under this License for that Work shall
|
|
84
|
-
terminate as of the date such litigation is filed.
|
|
85
|
-
|
|
86
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
87
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
88
|
-
modifications, and in Source or Object form, provided that You
|
|
89
|
-
meet the following conditions:
|
|
90
|
-
|
|
91
|
-
(a) You must give any other recipients of the Work or
|
|
92
|
-
Derivative Works a copy of this License; and
|
|
93
|
-
|
|
94
|
-
(b) You must cause any modified files to carry prominent notices
|
|
95
|
-
stating that You changed the files; and
|
|
96
|
-
|
|
97
|
-
(c) You must retain, in the Source form of any Derivative Work,
|
|
98
|
-
any patent, copyright, trademark, and other attribution
|
|
99
|
-
notices from the Source form of the Work, excluding those
|
|
100
|
-
notices that do not pertain to any part of the Derivative
|
|
101
|
-
Works; and
|
|
102
|
-
|
|
103
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
104
|
-
distribution, then You must include a readable copy of the
|
|
105
|
-
attribution notices contained within such NOTICE file, in
|
|
106
|
-
at least one of the following places: within a NOTICE text
|
|
107
|
-
file distributed as part of the Derivative Works; within
|
|
108
|
-
the Source form or documentation, if provided along with the
|
|
109
|
-
Derivative Works; or, within a display generated by the
|
|
110
|
-
Derivative Works, if and wherever such third-party notices
|
|
111
|
-
normally appear. The contents of the NOTICE file are for
|
|
112
|
-
informational purposes only and do not modify the License.
|
|
113
|
-
You may add Your own attribution notices within Derivative
|
|
114
|
-
Works that You place alongside or in addition to the NOTICE
|
|
115
|
-
text from the Work, provided that such additional attribution
|
|
116
|
-
notices cannot be construed as modifying the License.
|
|
117
|
-
|
|
118
|
-
You may add Your own license statement for Your modifications and
|
|
119
|
-
may provide additional terms and conditions for use, reproduction,
|
|
120
|
-
or modification of Your Derivative Works, as set forth in Section 6,
|
|
121
|
-
provided, however, that such additional terms do not contradict the
|
|
122
|
-
terms of this License.
|
|
123
|
-
|
|
124
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
125
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
126
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
127
|
-
this License, without any additional terms or conditions.
|
|
128
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
129
|
-
the terms of any separate license agreement you may have executed
|
|
130
|
-
with Licensor regarding such Contributions.
|
|
131
|
-
|
|
132
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
133
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
134
|
-
except as required for reasonable and customary use in describing the
|
|
135
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
136
|
-
|
|
137
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
138
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
139
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
140
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
141
|
-
implied, including, without limitation, any conditions of
|
|
142
|
-
TITLE, MERCHANTIBILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
|
143
|
-
You are solely responsible for determining the appropriateness of
|
|
144
|
-
using or reproducing the Work and assume any risks associated with
|
|
145
|
-
Your exercise of permissions under this License.
|
|
146
|
-
|
|
147
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
148
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
149
|
-
unless required by applicable law (such as deliberate and grossly
|
|
150
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
151
|
-
liable to You for damages, including any direct, indirect, special,
|
|
152
|
-
incidental, or exemplary damages of any character arising as a
|
|
153
|
-
result of this License or out of the use or inability to use the
|
|
154
|
-
Work (even if such Contributor has been advised of the possibility
|
|
155
|
-
of such damages).
|
|
156
|
-
|
|
157
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
158
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
159
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
160
|
-
or other liability obligations and/or rights consistent with this
|
|
161
|
-
License. However, in accepting such obligations, You may offer only
|
|
162
|
-
conditions that are consistent with this License and agree that
|
|
163
|
-
indemnity or any other liability be Your responsibility for any
|
|
164
|
-
obligations accepted beyond the terms of this License.
|
|
165
|
-
|
|
166
|
-
END OF TERMS AND CONDITIONS
|
|
167
|
-
|
|
168
|
-
Copyright 2025 Andrei Hasna
|
|
169
|
-
|
|
170
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
171
|
-
you may not use this file except in compliance with the License.
|
|
172
|
-
You may obtain a copy of the License at
|
|
173
|
-
|
|
174
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
175
|
-
|
|
176
|
-
Unless required by applicable law or agreed to in writing, software
|
|
177
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
178
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
179
|
-
See the License for the specific language governing permissions and
|
|
180
|
-
limitations under the License.
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under 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();
|