@chrryai/chrry 1.6.94 → 1.6.97

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/dist/index.d.mts CHANGED
@@ -834,7 +834,7 @@ declare const GUEST_TASKS_COUNT = 4;
834
834
  declare const MEMBER_TASKS_COUNT = 8;
835
835
  declare const PLUS_TASKS_COUNT = 30;
836
836
 
837
- declare const CHRRY_URL: string;
837
+ declare const CHRRY_URL: any;
838
838
  declare const FREE_DAYS = 5;
839
839
  declare const PLUS_PRICE = 9.99;
840
840
  declare const PRO_PRICE = 19.99;
@@ -846,9 +846,10 @@ declare const MAX_TOOL_CALLS_PER_MESSAGE = 7;
846
846
  declare const WS_URL: any;
847
847
  declare const WS_SERVER_URL: any;
848
848
  declare const addParam: (key: string, value: string) => void;
849
- declare const FRONTEND_URL: string;
850
- declare const PROD_FRONTEND_URL: string;
849
+ declare const FRONTEND_URL: any;
850
+ declare const PROD_FRONTEND_URL: any;
851
851
  declare const isE2E: boolean;
852
+ declare const API_INTERNAL_URL: any;
852
853
  declare const API_URL: any;
853
854
  declare const apiFetch: (url: string, options?: RequestInit) => Promise<Response>;
854
855
  declare const PROMPT_LIMITS: {
@@ -1901,4 +1902,4 @@ interface HistoryRouterProviderProps {
1901
1902
  */
1902
1903
  declare function HistoryRouterProvider({ children, }: HistoryRouterProviderProps): React.ReactElement;
1903
1904
 
1904
- export { ADDITIONAL_CREDITS, API_URL, type AgentCapabilities, type AgentModel, type AiAgent, type AiAgentCapabilities, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, Chrry, type CreateCustomAiAgent, FREE_DAYS, FRONTEND_URL, type FileValidationResult, GUEST_TASKS_COUNT, HistoryRouterProvider, MAX_FILE_LIMITS, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, MEMBER_TASKS_COUNT, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PLUS_TASKS_COUNT, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_SERVER_URL, WS_URL, addParam, aiAgentCapabilitiesSchema, aiAgentSchema, apiFetch, type appFormData, appSchema, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, createCustomAiAgentSchema, Chrry as default, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, formatFileSize, generateAppMetadata, generateStoreMetadata, generateThreadMetadata, getActions, getApp, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getEnv, getExampleInstructions, getExtensionUrl, getExtensionUrls, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMaxFileSize, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreadId, getThreads, getTranslations, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isProduction, isSameDay, isTestingDevice, isTextFile, isValidUsername, isValidUuidV4, pageSizes, removeParam, removeUser, reorderApps, replaceLinks, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useAppMetadata, useComputedValue, useCookieOrLocalStorage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall, useStoreMetadata, useSyncedState, useThreadMetadata, utcToday, validateFile };
1905
+ export { ADDITIONAL_CREDITS, API_INTERNAL_URL, API_URL, type AgentCapabilities, type AgentModel, type AiAgent, type AiAgentCapabilities, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, Chrry, type CreateCustomAiAgent, FREE_DAYS, FRONTEND_URL, type FileValidationResult, GUEST_TASKS_COUNT, HistoryRouterProvider, MAX_FILE_LIMITS, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, MEMBER_TASKS_COUNT, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PLUS_TASKS_COUNT, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_SERVER_URL, WS_URL, addParam, aiAgentCapabilitiesSchema, aiAgentSchema, apiFetch, type appFormData, appSchema, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, createCustomAiAgentSchema, Chrry as default, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, formatFileSize, generateAppMetadata, generateStoreMetadata, generateThreadMetadata, getActions, getApp, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getEnv, getExampleInstructions, getExtensionUrl, getExtensionUrls, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMaxFileSize, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreadId, getThreads, getTranslations, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isProduction, isSameDay, isTestingDevice, isTextFile, isValidUsername, isValidUuidV4, pageSizes, removeParam, removeUser, reorderApps, replaceLinks, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useAppMetadata, useComputedValue, useCookieOrLocalStorage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall, useStoreMetadata, useSyncedState, useThreadMetadata, utcToday, validateFile };
package/dist/index.d.ts CHANGED
@@ -834,7 +834,7 @@ declare const GUEST_TASKS_COUNT = 4;
834
834
  declare const MEMBER_TASKS_COUNT = 8;
835
835
  declare const PLUS_TASKS_COUNT = 30;
836
836
 
837
- declare const CHRRY_URL: string;
837
+ declare const CHRRY_URL: any;
838
838
  declare const FREE_DAYS = 5;
839
839
  declare const PLUS_PRICE = 9.99;
840
840
  declare const PRO_PRICE = 19.99;
@@ -846,9 +846,10 @@ declare const MAX_TOOL_CALLS_PER_MESSAGE = 7;
846
846
  declare const WS_URL: any;
847
847
  declare const WS_SERVER_URL: any;
848
848
  declare const addParam: (key: string, value: string) => void;
849
- declare const FRONTEND_URL: string;
850
- declare const PROD_FRONTEND_URL: string;
849
+ declare const FRONTEND_URL: any;
850
+ declare const PROD_FRONTEND_URL: any;
851
851
  declare const isE2E: boolean;
852
+ declare const API_INTERNAL_URL: any;
852
853
  declare const API_URL: any;
853
854
  declare const apiFetch: (url: string, options?: RequestInit) => Promise<Response>;
854
855
  declare const PROMPT_LIMITS: {
@@ -1901,4 +1902,4 @@ interface HistoryRouterProviderProps {
1901
1902
  */
1902
1903
  declare function HistoryRouterProvider({ children, }: HistoryRouterProviderProps): React.ReactElement;
1903
1904
 
1904
- export { ADDITIONAL_CREDITS, API_URL, type AgentCapabilities, type AgentModel, type AiAgent, type AiAgentCapabilities, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, Chrry, type CreateCustomAiAgent, FREE_DAYS, FRONTEND_URL, type FileValidationResult, GUEST_TASKS_COUNT, HistoryRouterProvider, MAX_FILE_LIMITS, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, MEMBER_TASKS_COUNT, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PLUS_TASKS_COUNT, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_SERVER_URL, WS_URL, addParam, aiAgentCapabilitiesSchema, aiAgentSchema, apiFetch, type appFormData, appSchema, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, createCustomAiAgentSchema, Chrry as default, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, formatFileSize, generateAppMetadata, generateStoreMetadata, generateThreadMetadata, getActions, getApp, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getEnv, getExampleInstructions, getExtensionUrl, getExtensionUrls, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMaxFileSize, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreadId, getThreads, getTranslations, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isProduction, isSameDay, isTestingDevice, isTextFile, isValidUsername, isValidUuidV4, pageSizes, removeParam, removeUser, reorderApps, replaceLinks, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useAppMetadata, useComputedValue, useCookieOrLocalStorage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall, useStoreMetadata, useSyncedState, useThreadMetadata, utcToday, validateFile };
1905
+ export { ADDITIONAL_CREDITS, API_INTERNAL_URL, API_URL, type AgentCapabilities, type AgentModel, type AiAgent, type AiAgentCapabilities, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, Chrry, type CreateCustomAiAgent, FREE_DAYS, FRONTEND_URL, type FileValidationResult, GUEST_TASKS_COUNT, HistoryRouterProvider, MAX_FILE_LIMITS, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, MEMBER_TASKS_COUNT, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PLUS_TASKS_COUNT, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_SERVER_URL, WS_URL, addParam, aiAgentCapabilitiesSchema, aiAgentSchema, apiFetch, type appFormData, appSchema, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, createCustomAiAgentSchema, Chrry as default, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, formatFileSize, generateAppMetadata, generateStoreMetadata, generateThreadMetadata, getActions, getApp, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getEnv, getExampleInstructions, getExtensionUrl, getExtensionUrls, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMaxFileSize, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreadId, getThreads, getTranslations, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isProduction, isSameDay, isTestingDevice, isTextFile, isValidUsername, isValidUuidV4, pageSizes, removeParam, removeUser, reorderApps, replaceLinks, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useAppMetadata, useComputedValue, useCookieOrLocalStorage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall, useStoreMetadata, useSyncedState, useThreadMetadata, utcToday, validateFile };
package/dist/index.js CHANGED
@@ -46,7 +46,7 @@ var init_env = __esm({
46
46
  }
47
47
  return process.env;
48
48
  };
49
- isCI = getEnv().NEXT_PUBLIC_CI === "true" || getEnv().CI === "true";
49
+ isCI = getEnv().VITE_CI === "true" || getEnv().CI === "true";
50
50
  checkIsExtension = () => {
51
51
  if (typeof chrome !== "undefined" && chrome.runtime?.id) {
52
52
  return true;
@@ -66,7 +66,7 @@ var init_env = __esm({
66
66
  }
67
67
  return `${window.location.origin}/index.html`;
68
68
  };
69
- isProduction = getEnv().NODE_ENV === "production" || getEnv().NEXT_PUBLIC_NODE_ENV === "production";
69
+ isProduction = getEnv().NODE_ENV === "production" || getEnv().VITE_NODE_ENV === "production";
70
70
  isDevelopment = checkIsExtension() ? ["bikahnjnakdnnccpnmcpmiojnehfooio"].some(
71
71
  (id) => getExtensionUrl()?.includes(id)
72
72
  ) : !isProduction;
@@ -529,7 +529,8 @@ var init_locales = __esm({
529
529
 
530
530
  // utils/siteConfig.ts
531
531
  function detectSiteModeDomain(hostname2, mode) {
532
- const defaultMode = process.env.MODE || import_meta2.env?.VITE_SITE_MODE || mode || "vex";
532
+ const defaultMode = import_meta2.env?.VITE_SITE_MODE || mode || "vex";
533
+ console.log(`\u{1F680} ~ defaultMode:`, defaultMode);
533
534
  const rawHost = hostname2 || (typeof window !== "undefined" ? window?.location?.hostname : "") || "";
534
535
  let host = rawHost?.trim().toLowerCase();
535
536
  if (host?.includes("://")) {
@@ -605,6 +606,7 @@ function detectSiteMode(hostname2) {
605
606
  return detectSiteModeDomain(hostname2);
606
607
  }
607
608
  function getSiteConfig(hostnameOrMode) {
609
+ console.log(`\u{1F680} ~ getSiteConfig ~ hostnameOrMode:`, hostnameOrMode);
608
610
  let hostname2 = hostnameOrMode;
609
611
  if (hostnameOrMode && hostnameOrMode.includes("://")) {
610
612
  try {
@@ -2907,7 +2909,7 @@ function checkThreadSummaryLimit({
2907
2909
  function isValidUsername(username) {
2908
2910
  return /^[a-zA-Z0-9]{3,20}$/.test(username);
2909
2911
  }
2910
- var import_i18n_iso_countries, isSameDay, GUEST_TASKS_COUNT, MEMBER_TASKS_COUNT, PLUS_TASKS_COUNT, getClientHostname, hostname, CHRRY_URL, FREE_DAYS, PLUS_PRICE, PRO_PRICE, CREDITS_PRICE, ADDITIONAL_CREDITS, MAX_TOOL_CALLS_PER_MESSAGE, WS_URL, WS_SERVER_URL, addParam, FE_PORT, API_PORT, FRONTEND_URL, PROD_FRONTEND_URL, isE2E, API_URL, apiFetch, PROMPT_LIMITS, expenseCategory, budgetCategory, extensionSuggestions, storage, pageSizes, now, utcToday, getExtensionUrls, getBrowserAPI, BrowserInstance, getMetadata, removeParam, isFirefox, config, VERSION, getSlugFromPathname, getInstructionConfig, getBrowserIdentity, THREAD_SUMMARY_LIMITS, getRedirectURL, getDailyImageLimit, isCollaborator, PDF_LIMITS, MAX_FILE_LIMITS, MAX_FILE_SIZES, OWNER_CREDITS, isDeepEqual;
2912
+ var import_i18n_iso_countries, isSameDay, GUEST_TASKS_COUNT, MEMBER_TASKS_COUNT, PLUS_TASKS_COUNT, getClientHostname, hostname, CHRRY_URL, FREE_DAYS, PLUS_PRICE, PRO_PRICE, CREDITS_PRICE, ADDITIONAL_CREDITS, MAX_TOOL_CALLS_PER_MESSAGE, WS_URL, WS_SERVER_URL, addParam, FE_PORT, API_PORT, FRONTEND_URL, PROD_FRONTEND_URL, isE2E, API_INTERNAL_URL, API_URL, apiFetch, PROMPT_LIMITS, expenseCategory, budgetCategory, extensionSuggestions, storage, pageSizes, now, utcToday, getExtensionUrls, getBrowserAPI, BrowserInstance, getMetadata, removeParam, isFirefox, config, VERSION, getSlugFromPathname, getInstructionConfig, getBrowserIdentity, THREAD_SUMMARY_LIMITS, getRedirectURL, getDailyImageLimit, isCollaborator, PDF_LIMITS, MAX_FILE_LIMITS, MAX_FILE_SIZES, OWNER_CREDITS, isDeepEqual;
2911
2913
  var init_utils = __esm({
2912
2914
  "utils/index.ts"() {
2913
2915
  "use strict";
@@ -2940,7 +2942,7 @@ var init_utils = __esm({
2940
2942
  return void 0;
2941
2943
  };
2942
2944
  hostname = getClientHostname();
2943
- CHRRY_URL = hostname ? getSiteConfig(hostname).url : "https://vex.chrry.ai";
2945
+ CHRRY_URL = getEnv().VITE_CHRRY_URL || (hostname ? getSiteConfig(hostname).url : "https://vex.chrry.ai");
2944
2946
  FREE_DAYS = 5;
2945
2947
  PLUS_PRICE = 9.99;
2946
2948
  PRO_PRICE = 19.99;
@@ -2961,6 +2963,7 @@ var init_utils = __esm({
2961
2963
  FRONTEND_URL = isTestingDevice ? `http://192.168.2.27:${FE_PORT}` : isDevelopment ? `http://localhost:${FE_PORT}` : CHRRY_URL;
2962
2964
  PROD_FRONTEND_URL = CHRRY_URL;
2963
2965
  isE2E = getEnv().VITE_TESTING_ENV === "e2e" || getEnv().TESTING_ENV === "e2e";
2966
+ API_INTERNAL_URL = getEnv().VITE_API_INTERNAL_URL;
2964
2967
  API_URL = getEnv().VITE_API_URL || (isTestingDevice ? `http://192.168.2.27:${API_PORT}/api` : isDevelopment ? `http://localhost:${API_PORT}/api` : isE2E ? "https://e2e.chrry.dev/api" : "https://chrry.dev/api");
2965
2968
  apiFetch = (url, options) => {
2966
2969
  return fetch(url, {
@@ -3141,7 +3144,7 @@ var init_utils = __esm({
3141
3144
  };
3142
3145
  isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes("Firefox");
3143
3146
  config = getSiteConfig(getClientHostname());
3144
- VERSION = config.version || "1.6.94";
3147
+ VERSION = config.version || "1.6.97";
3145
3148
  getSlugFromPathname = (path) => {
3146
3149
  return getAppAndStoreSlugs(path, {
3147
3150
  defaultAppSlug: config.slug,
@@ -24690,7 +24693,7 @@ function DataProvider({ children, ...rest }) {
24690
24693
  const [instructions, setInstructions] = (0, import_react21.useState)([]);
24691
24694
  const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
24692
24695
  const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
24693
- const VERSION4 = "1.6.94";
24696
+ const VERSION4 = "1.6.97";
24694
24697
  const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
24695
24698
  const {
24696
24699
  API_URL: API_URL2,
@@ -31792,7 +31795,7 @@ function EnableNotifications({
31792
31795
  return;
31793
31796
  }
31794
31797
  if (swRegistration && !pushSubscription) {
31795
- const publicVapidKey = getEnv().NEXT_PUBLIC_VAPID_PUBLIC_KEY;
31798
+ const publicVapidKey = getEnv().VITE_VAPID_PUBLIC_KEY;
31796
31799
  const subscription = await subscribeToPushNotifications(
31797
31800
  swRegistration,
31798
31801
  publicVapidKey
@@ -66686,6 +66689,7 @@ var init_hooks = __esm({
66686
66689
  var index_exports = {};
66687
66690
  __export(index_exports, {
66688
66691
  ADDITIONAL_CREDITS: () => ADDITIONAL_CREDITS,
66692
+ API_INTERNAL_URL: () => API_INTERNAL_URL,
66689
66693
  API_URL: () => API_URL,
66690
66694
  BrowserInstance: () => BrowserInstance,
66691
66695
  CHRRY_URL: () => CHRRY_URL,
@@ -66926,6 +66930,7 @@ function HistoryRouterProvider({
66926
66930
  // Annotate the CommonJS export names for ESM import in node:
66927
66931
  0 && (module.exports = {
66928
66932
  ADDITIONAL_CREDITS,
66933
+ API_INTERNAL_URL,
66929
66934
  API_URL,
66930
66935
  BrowserInstance,
66931
66936
  CHRRY_URL,