@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 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 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).
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
- 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.
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 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.
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 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
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 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.
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 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.
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 exemplary damages of any character arising as a
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 (even if such Contributor has been advised of the possibility
155
- of such damages).
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 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.
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 2025 Andrei Hasna
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 = ? AND contact_id IS NOT NULL LIMIT 1`).get(contactId);
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(/\\\\/g, "\\");
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 = ? AND contact_id IS NOT NULL LIMIT 1`).get(contactId);
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(/\\\\/g, "\\");
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();
@@ -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;AAqND,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"}
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 = ? AND contact_id IS NOT NULL LIMIT 1`).get(contactId);
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(/\\\\/g, "\\");
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: ["prospecting", "qualified", "proposal", "negotiation", "won", "lost"], description: "Deal stage (default: prospecting)" },
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: ["prospecting", "qualified", "proposal", "negotiation", "won", "lost"] },
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: ["prospecting", "qualified", "proposal", "negotiation", "won", "lost"] },
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" }
@@ -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 ["prospecting", "qualified", "proposal", "negotiation", "won", "lost"];
2172
- readonly description: "Deal stage (default: prospecting)";
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 ["prospecting", "qualified", "proposal", "negotiation", "won", "lost"];
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 ["prospecting", "qualified", "proposal", "negotiation", "won", "lost"];
2234
+ readonly enum: readonly ["lead", "qualified", "proposal", "negotiation", "won", "lost", "cancelled"];
2235
2235
  };
2236
2236
  readonly value_usd: {
2237
2237
  readonly type: "number";
@@ -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(/\\\\/g, "\\");
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/contacts",
3
- "version": "0.6.15",
3
+ "version": "0.6.17",
4
4
  "description": "Contact management for AI coding agents — CLI + MCP + Web",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",