@hasna/contacts 0.6.32 → 0.6.33

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.
@@ -0,0 +1,3 @@
1
+ export declare function createCloudRequestHandler(): (req: Request) => Promise<Response>;
2
+ export declare function startCloudServer(port: number, hostname: string): void;
3
+ //# sourceMappingURL=cloud-serve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-serve.d.ts","sourceRoot":"","sources":["../../src/server/cloud-serve.ts"],"names":[],"mappings":"AAkCA,wBAAgB,yBAAyB,IAAI,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CA2D/E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAGrE"}
@@ -15,7 +15,9 @@ export declare const CONTACTS_APP_SLUG = "contacts";
15
15
  export declare function resolveCloudDatabaseUrl(env?: NodeJS.ProcessEnv): string | undefined;
16
16
  /** Resolve the HMAC signing secret used to verify API keys. */
17
17
  export declare function resolveSigningSecret(env?: NodeJS.ProcessEnv): string | undefined;
18
- /** True when this process is configured to serve the cloud `/v1` API. */
18
+ /** True when this process is configured to serve the cloud `/v1` API.
19
+ * Explicit remote mode remains cloud even when its DSN is missing so readiness
20
+ * fails closed instead of presenting the process as a healthy local server. */
19
21
  export declare function isCloudModeEnabled(env?: NodeJS.ProcessEnv): boolean;
20
22
  /** The vendored-kit Postgres pool client backing every `/v1` handler. */
21
23
  export declare function getCloudClient(): PoolQueryClient;
@@ -1 +1 @@
1
- {"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../src/server/cloud.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAgB,WAAW,EAAE,KAAK,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAE7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAIzE,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAOhG;AAED,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAO7F;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAEhF;AAQD,yEAAyE;AACzE,wBAAgB,cAAc,IAAI,eAAe,CA2BhD;AAYD,wBAAgB,cAAc,IAAI,WAAW,CAI5C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,cAAc,CAejD;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAUvD;AAED;;;;;;;;;GASG;AACH,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC,CAYjE;AAED,iEAAiE;AACjE,wBAAsB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAGlD;AAED,4BAA4B;AAC5B,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAOhD"}
1
+ {"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../src/server/cloud.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAgB,WAAW,EAAE,KAAK,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAE7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAIzE,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAOhG;AAED,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAO7F;AAED;;+EAE+E;AAC/E,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAGhF;AAQD,yEAAyE;AACzE,wBAAgB,cAAc,IAAI,eAAe,CA2BhD;AAYD,wBAAgB,cAAc,IAAI,WAAW,CAI5C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,cAAc,CAejD;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAUvD;AAED;;;;;;;;;GASG;AACH,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC,CAYjE;AAED,iEAAiE;AACjE,wBAAsB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAGlD;AAED,4BAA4B;AAC5B,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAOhD"}
@@ -4513,10 +4513,13 @@ var require_data = __commonJS((exports, module) => {
4513
4513
  };
4514
4514
  });
4515
4515
 
4516
- // node_modules/fast-uri/lib/utils.js
4516
+ // vendor/fast-uri/lib/utils.js
4517
4517
  var require_utils = __commonJS((exports, module) => {
4518
4518
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
4519
4519
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
4520
+ var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
4521
+ var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
4522
+ var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
4520
4523
  function stringArrayToHexStripped(input) {
4521
4524
  let acc = "";
4522
4525
  let code = 0;
@@ -4710,27 +4713,77 @@ var require_utils = __commonJS((exports, module) => {
4710
4713
  }
4711
4714
  return output.join("");
4712
4715
  }
4713
- function normalizeComponentEncoding(component, esc2) {
4714
- const func = esc2 !== true ? escape : unescape;
4715
- if (component.scheme !== undefined) {
4716
- component.scheme = func(component.scheme);
4717
- }
4718
- if (component.userinfo !== undefined) {
4719
- component.userinfo = func(component.userinfo);
4720
- }
4721
- if (component.host !== undefined) {
4722
- component.host = func(component.host);
4716
+ var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
4717
+ var HOST_DELIM_RE = /[@/?#:]/g;
4718
+ var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
4719
+ function reescapeHostDelimiters(host, isIP) {
4720
+ const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
4721
+ re.lastIndex = 0;
4722
+ return host.replace(re, (ch) => HOST_DELIMS[ch]);
4723
+ }
4724
+ function normalizePercentEncoding(input, decodeUnreserved = false) {
4725
+ if (input.indexOf("%") === -1) {
4726
+ return input;
4723
4727
  }
4724
- if (component.path !== undefined) {
4725
- component.path = func(component.path);
4728
+ let output = "";
4729
+ for (let i = 0;i < input.length; i++) {
4730
+ if (input[i] === "%" && i + 2 < input.length) {
4731
+ const hex = input.slice(i + 1, i + 3);
4732
+ if (isHexPair(hex)) {
4733
+ const normalizedHex = hex.toUpperCase();
4734
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
4735
+ if (decodeUnreserved && isUnreserved(decoded)) {
4736
+ output += decoded;
4737
+ } else {
4738
+ output += "%" + normalizedHex;
4739
+ }
4740
+ i += 2;
4741
+ continue;
4742
+ }
4743
+ }
4744
+ output += input[i];
4726
4745
  }
4727
- if (component.query !== undefined) {
4728
- component.query = func(component.query);
4746
+ return output;
4747
+ }
4748
+ function normalizePathEncoding(input) {
4749
+ let output = "";
4750
+ for (let i = 0;i < input.length; i++) {
4751
+ if (input[i] === "%" && i + 2 < input.length) {
4752
+ const hex = input.slice(i + 1, i + 3);
4753
+ if (isHexPair(hex)) {
4754
+ const normalizedHex = hex.toUpperCase();
4755
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
4756
+ if (decoded !== "." && isUnreserved(decoded)) {
4757
+ output += decoded;
4758
+ } else {
4759
+ output += "%" + normalizedHex;
4760
+ }
4761
+ i += 2;
4762
+ continue;
4763
+ }
4764
+ }
4765
+ if (isPathCharacter(input[i])) {
4766
+ output += input[i];
4767
+ } else {
4768
+ output += escape(input[i]);
4769
+ }
4729
4770
  }
4730
- if (component.fragment !== undefined) {
4731
- component.fragment = func(component.fragment);
4771
+ return output;
4772
+ }
4773
+ function escapePreservingEscapes(input) {
4774
+ let output = "";
4775
+ for (let i = 0;i < input.length; i++) {
4776
+ if (input[i] === "%" && i + 2 < input.length) {
4777
+ const hex = input.slice(i + 1, i + 3);
4778
+ if (isHexPair(hex)) {
4779
+ output += "%" + hex.toUpperCase();
4780
+ i += 2;
4781
+ continue;
4782
+ }
4783
+ }
4784
+ output += escape(input[i]);
4732
4785
  }
4733
- return component;
4786
+ return output;
4734
4787
  }
4735
4788
  function recomposeAuthority(component) {
4736
4789
  const uriTokens = [];
@@ -4745,7 +4798,7 @@ var require_utils = __commonJS((exports, module) => {
4745
4798
  if (ipV6res.isIPV6 === true) {
4746
4799
  host = `[${ipV6res.escapedHost}]`;
4747
4800
  } else {
4748
- host = component.host;
4801
+ host = reescapeHostDelimiters(host, false);
4749
4802
  }
4750
4803
  }
4751
4804
  uriTokens.push(host);
@@ -4759,7 +4812,10 @@ var require_utils = __commonJS((exports, module) => {
4759
4812
  module.exports = {
4760
4813
  nonSimpleDomain,
4761
4814
  recomposeAuthority,
4762
- normalizeComponentEncoding,
4815
+ reescapeHostDelimiters,
4816
+ normalizePercentEncoding,
4817
+ normalizePathEncoding,
4818
+ escapePreservingEscapes,
4763
4819
  removeDotSegments,
4764
4820
  isIPv4,
4765
4821
  isUUID,
@@ -4768,7 +4824,7 @@ var require_utils = __commonJS((exports, module) => {
4768
4824
  };
4769
4825
  });
4770
4826
 
4771
- // node_modules/fast-uri/lib/schemes.js
4827
+ // vendor/fast-uri/lib/schemes.js
4772
4828
  var require_schemes = __commonJS((exports, module) => {
4773
4829
  var { isUUID } = require_utils();
4774
4830
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -4942,13 +4998,13 @@ var require_schemes = __commonJS((exports, module) => {
4942
4998
  };
4943
4999
  });
4944
5000
 
4945
- // node_modules/fast-uri/index.js
5001
+ // vendor/fast-uri/index.js
4946
5002
  var require_fast_uri = __commonJS((exports, module) => {
4947
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
5003
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
4948
5004
  var { SCHEMES, getSchemeHandler } = require_schemes();
4949
5005
  function normalize(uri, options) {
4950
5006
  if (typeof uri === "string") {
4951
- uri = serialize(parse6(uri, options), options);
5007
+ uri = normalizeString(uri, options);
4952
5008
  } else if (typeof uri === "object") {
4953
5009
  uri = parse6(serialize(uri, options), options);
4954
5010
  }
@@ -5014,19 +5070,9 @@ var require_fast_uri = __commonJS((exports, module) => {
5014
5070
  return target;
5015
5071
  }
5016
5072
  function equal(uriA, uriB, options) {
5017
- if (typeof uriA === "string") {
5018
- uriA = unescape(uriA);
5019
- uriA = serialize(normalizeComponentEncoding(parse6(uriA, options), true), { ...options, skipEscape: true });
5020
- } else if (typeof uriA === "object") {
5021
- uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
5022
- }
5023
- if (typeof uriB === "string") {
5024
- uriB = unescape(uriB);
5025
- uriB = serialize(normalizeComponentEncoding(parse6(uriB, options), true), { ...options, skipEscape: true });
5026
- } else if (typeof uriB === "object") {
5027
- uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
5028
- }
5029
- return uriA.toLowerCase() === uriB.toLowerCase();
5073
+ const normalizedA = normalizeComparableURI(uriA, options);
5074
+ const normalizedB = normalizeComparableURI(uriB, options);
5075
+ return normalizedA !== undefined && normalizedB !== undefined && normalizedA.toLowerCase() === normalizedB.toLowerCase();
5030
5076
  }
5031
5077
  function serialize(cmpts, opts) {
5032
5078
  const component = {
@@ -5052,12 +5098,12 @@ var require_fast_uri = __commonJS((exports, module) => {
5052
5098
  schemeHandler.serialize(component, options);
5053
5099
  if (component.path !== undefined) {
5054
5100
  if (!options.skipEscape) {
5055
- component.path = escape(component.path);
5101
+ component.path = escapePreservingEscapes(component.path);
5056
5102
  if (component.scheme !== undefined) {
5057
5103
  component.path = component.path.split("%3A").join(":");
5058
5104
  }
5059
5105
  } else {
5060
- component.path = unescape(component.path);
5106
+ component.path = normalizePercentEncoding(component.path);
5061
5107
  }
5062
5108
  }
5063
5109
  if (options.reference !== "suffix" && component.scheme) {
@@ -5092,7 +5138,17 @@ var require_fast_uri = __commonJS((exports, module) => {
5092
5138
  return uriTokens.join("");
5093
5139
  }
5094
5140
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
5095
- function parse6(uri, opts) {
5141
+ var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
5142
+ function getParseError(parsed, matches) {
5143
+ if (matches[2] !== undefined && parsed.path && parsed.path[0] !== "/") {
5144
+ return 'URI path must start with "/" when authority is present.';
5145
+ }
5146
+ if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
5147
+ return "URI port is malformed.";
5148
+ }
5149
+ return;
5150
+ }
5151
+ function parseWithStatus(uri, opts) {
5096
5152
  const options = Object.assign({}, opts);
5097
5153
  const parsed = {
5098
5154
  scheme: undefined,
@@ -5103,6 +5159,7 @@ var require_fast_uri = __commonJS((exports, module) => {
5103
5159
  query: undefined,
5104
5160
  fragment: undefined
5105
5161
  };
5162
+ let malformedAuthorityOrPort = false;
5106
5163
  let isIP = false;
5107
5164
  if (options.reference === "suffix") {
5108
5165
  if (options.scheme) {
@@ -5111,6 +5168,11 @@ var require_fast_uri = __commonJS((exports, module) => {
5111
5168
  uri = "//" + uri;
5112
5169
  }
5113
5170
  }
5171
+ const authorityMatch = uri.match(AUTHORITY_PREFIX);
5172
+ if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
5173
+ parsed.error = "URI authority must not contain a literal backslash.";
5174
+ malformedAuthorityOrPort = true;
5175
+ }
5114
5176
  const matches = uri.match(URI_PARSE);
5115
5177
  if (matches) {
5116
5178
  parsed.scheme = matches[1];
@@ -5123,6 +5185,11 @@ var require_fast_uri = __commonJS((exports, module) => {
5123
5185
  if (isNaN(parsed.port)) {
5124
5186
  parsed.port = matches[5];
5125
5187
  }
5188
+ const parseError = getParseError(parsed, matches);
5189
+ if (parseError !== undefined) {
5190
+ parsed.error = parsed.error || parseError;
5191
+ malformedAuthorityOrPort = true;
5192
+ }
5126
5193
  if (parsed.host) {
5127
5194
  const ipv4result = isIPv4(parsed.host);
5128
5195
  if (ipv4result === false) {
@@ -5149,7 +5216,7 @@ var require_fast_uri = __commonJS((exports, module) => {
5149
5216
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
5150
5217
  if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
5151
5218
  try {
5152
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
5219
+ parsed.host = new URL("http://" + parsed.host).hostname;
5153
5220
  } catch (e) {
5154
5221
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
5155
5222
  }
@@ -5161,14 +5228,18 @@ var require_fast_uri = __commonJS((exports, module) => {
5161
5228
  parsed.scheme = unescape(parsed.scheme);
5162
5229
  }
5163
5230
  if (parsed.host !== undefined) {
5164
- parsed.host = unescape(parsed.host);
5231
+ parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
5165
5232
  }
5166
5233
  }
5167
5234
  if (parsed.path) {
5168
- parsed.path = escape(unescape(parsed.path));
5235
+ parsed.path = normalizePathEncoding(parsed.path);
5169
5236
  }
5170
5237
  if (parsed.fragment) {
5171
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
5238
+ try {
5239
+ parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
5240
+ } catch {
5241
+ parsed.error = parsed.error || "URI malformed";
5242
+ }
5172
5243
  }
5173
5244
  }
5174
5245
  if (schemeHandler && schemeHandler.parse) {
@@ -5177,7 +5248,29 @@ var require_fast_uri = __commonJS((exports, module) => {
5177
5248
  } else {
5178
5249
  parsed.error = parsed.error || "URI can not be parsed.";
5179
5250
  }
5180
- return parsed;
5251
+ return { parsed, malformedAuthorityOrPort };
5252
+ }
5253
+ function parse6(uri, opts) {
5254
+ return parseWithStatus(uri, opts).parsed;
5255
+ }
5256
+ function normalizeString(uri, opts) {
5257
+ return normalizeStringWithStatus(uri, opts).normalized;
5258
+ }
5259
+ function normalizeStringWithStatus(uri, opts) {
5260
+ const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
5261
+ return {
5262
+ normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
5263
+ malformedAuthorityOrPort
5264
+ };
5265
+ }
5266
+ function normalizeComparableURI(uri, opts) {
5267
+ if (typeof uri === "string") {
5268
+ const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
5269
+ return malformedAuthorityOrPort ? undefined : normalized;
5270
+ }
5271
+ if (typeof uri === "object") {
5272
+ return serialize(uri, opts);
5273
+ }
5181
5274
  }
5182
5275
  var fastUri = {
5183
5276
  SCHEMES,
@@ -8950,7 +9043,8 @@ function resolveSigningSecret(env = process.env) {
8950
9043
  return env.HASNA_CONTACTS_API_SIGNING_KEY || env.HASNA_API_SIGNING_KEY || env.API_KEY_SIGNING_SECRET || undefined;
8951
9044
  }
8952
9045
  function isCloudModeEnabled(env = process.env) {
8953
- return Boolean(resolveCloudDatabaseUrl(env));
9046
+ const mode = env.HASNA_CONTACTS_STORAGE_MODE || env.CONTACTS_STORAGE_MODE;
9047
+ return Boolean(resolveCloudDatabaseUrl(env)) || mode === "cloud" || mode === "self_hosted";
8954
9048
  }
8955
9049
  function getCloudClient() {
8956
9050
  if (cachedClient)
@@ -31019,8 +31113,13 @@ async function main() {
31019
31113
  await buildServer().connect(transport);
31020
31114
  console.error("Contacts MCP server running on stdio");
31021
31115
  }
31022
- var isDirectRun = import.meta.url === `file://${process.argv[1]}` || process.argv[1]?.endsWith("mcp/index.ts") || process.argv[1]?.endsWith("mcp/index.js");
31023
- if (isDirectRun) {
31116
+ function isDirectMcpEntry(entry = process.argv[1]) {
31117
+ if (!entry)
31118
+ return false;
31119
+ const normalized = entry.replaceAll("\\", "/");
31120
+ return normalized.endsWith("/mcp/index.ts") || normalized.endsWith("/mcp/index.js");
31121
+ }
31122
+ if (isDirectMcpEntry()) {
31024
31123
  main().catch((err2) => {
31025
31124
  console.error("Fatal error:", err2);
31026
31125
  process.exit(1);
@@ -32834,7 +32933,12 @@ async function handleV1Request(req, url) {
32834
32933
  }
32835
32934
  await ensureCloudSchemaBestEffort();
32836
32935
  const store = getContactsPgStore(getCloudClient());
32837
- const segments = path.split("/").filter(Boolean).map((segment) => decodeURIComponent(segment));
32936
+ let segments;
32937
+ try {
32938
+ segments = path.split("/").filter(Boolean).map((segment) => decodeURIComponent(segment));
32939
+ } catch {
32940
+ return error2(400, "invalid URL path encoding");
32941
+ }
32838
32942
  const resource = segments[1];
32839
32943
  const id = segments[2];
32840
32944
  const sub = segments[3];
@@ -1 +1 @@
1
- {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/server/v1.ts"],"names":[],"mappings":"AAwCA;;;GAGG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAwctF"}
1
+ {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/server/v1.ts"],"names":[],"mappings":"AAwCA;;;GAGG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CA6ctF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/contacts",
3
- "version": "0.6.32",
3
+ "version": "0.6.33",
4
4
  "description": "Contact management for AI coding agents — CLI + MCP + Web",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,6 +26,8 @@
26
26
  "migrations",
27
27
  "hasna.contract.json",
28
28
  "LICENSE",
29
+ "THIRD_PARTY_NOTICES.md",
30
+ "vendor/fast-uri/LICENSE",
29
31
  "README.md"
30
32
  ],
31
33
  "scripts": {
@@ -33,8 +35,8 @@
33
35
  "clean:core": "rm -rf dist",
34
36
  "build": "bun run clean && cd dashboard && bun run build && cd .. && bun run build:bundles && tsc -p tsconfig.build.json --emitDeclarationOnly --outDir dist",
35
37
  "build:core": "bun run clean:core && bun run build:bundles && tsc -p tsconfig.build.json --emitDeclarationOnly --outDir dist",
36
- "build:bundles": "bun build src/cli/index.tsx --outdir dist/cli --target bun --external ink --external react --external chalk --external pg --external @hasna/contracts --external @modelcontextprotocol/sdk && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external pg --external @hasna/contracts --external @modelcontextprotocol/sdk && bun build src/server/index.ts --outdir dist/server --target bun --external pg --external @hasna/contracts && bun build src/sdk/index.ts --outdir dist/sdk --target bun && bun build src/index.ts --outdir dist --target bun --external pg --external @hasna/contracts",
37
- "build:server": "rm -rf dist/server dist/sdk && bun build src/server/index.ts --outdir dist/server --target bun --external pg --external @hasna/contracts",
38
+ "build:bundles": "bun run scripts/build-bundles.ts",
39
+ "build:server": "rm -rf dist/server dist/sdk && bun run scripts/build-bundles.ts --server-only",
38
40
  "generate:sdk": "bun run scripts/generate-sdk.ts",
39
41
  "migrate": "bun run scripts/migrate.ts",
40
42
  "typecheck": "tsc --noEmit",
@@ -75,7 +77,6 @@
75
77
  "dependencies": {
76
78
  "@hasna/contracts": "^0.5.1",
77
79
  "@hasna/events": "^0.1.6",
78
- "@modelcontextprotocol/sdk": "^1.12.1",
79
80
  "chalk": "^5.4.1",
80
81
  "commander": "^13.1.0",
81
82
  "ink": "^5.2.0",
@@ -87,6 +88,10 @@
87
88
  "@types/bun": "^1.2.4",
88
89
  "@types/pg": "^8.11.11",
89
90
  "@types/react": "^18.3.18",
91
+ "@modelcontextprotocol/sdk": "^1.12.1",
90
92
  "typescript": "^5.7.3"
93
+ },
94
+ "overrides": {
95
+ "fast-uri": "3.1.3"
91
96
  }
92
97
  }
@@ -0,0 +1,30 @@
1
+ Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
2
+ Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright
10
+ notice, this list of conditions and the following disclaimer in the
11
+ documentation and/or other materials provided with the distribution.
12
+ * The names of any contributors may not be used to endorse or promote
13
+ products derived from this software without specific prior written
14
+ permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
20
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
+
27
+ * * *
28
+
29
+ The complete list of contributors can be found at:
30
+ - https://github.com/garycourt/uri-js/graphs/contributors