@xuda.io/ai_module 1.1.4682 → 1.1.4684
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/index.mjs +26 -25
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -678,7 +678,7 @@ const validate_table_data_doc = tool({
|
|
|
678
678
|
udfData: z.object({
|
|
679
679
|
udffileid: z.string(),
|
|
680
680
|
data: z.record(z.union([z.string(), z.number()])), // Any key-value pairs
|
|
681
|
-
error: z.object({}).optional(),
|
|
681
|
+
error: z.object({}).optional().nullable(),
|
|
682
682
|
}),
|
|
683
683
|
ts: z.number(),
|
|
684
684
|
date: z.number(),
|
|
@@ -690,7 +690,8 @@ const validate_table_data_doc = tool({
|
|
|
690
690
|
keySegments: z.array(z.any()),
|
|
691
691
|
keyValue: z.array(z.any()),
|
|
692
692
|
})
|
|
693
|
-
.optional()
|
|
693
|
+
.optional()
|
|
694
|
+
.nullable(),
|
|
694
695
|
),
|
|
695
696
|
});
|
|
696
697
|
const doc_obj = JSON5.parse(doc);
|
|
@@ -7782,8 +7783,8 @@ Category:`;
|
|
|
7782
7783
|
prompt_category: z.enum(ai_prompt_categories),
|
|
7783
7784
|
confidence_score: z.number().min(0).max(100),
|
|
7784
7785
|
primary_intent: z.string().max(100),
|
|
7785
|
-
secondary_category: z.string().optional(),
|
|
7786
|
-
complexity_level: z.enum(['Basic', 'Intermediate', 'Advanced', 'Expert']).optional(),
|
|
7786
|
+
secondary_category: z.string().optional().nullable(),
|
|
7787
|
+
complexity_level: z.enum(['Basic', 'Intermediate', 'Advanced', 'Expert']).optional().nullable(),
|
|
7787
7788
|
}),
|
|
7788
7789
|
metadata: {
|
|
7789
7790
|
func: 'categorize_ai_prompt',
|
|
@@ -9643,8 +9644,8 @@ export const get_person_info = async function (uid, name, email, account_profile
|
|
|
9643
9644
|
person_full_name: z.string().describe("Person's full name"),
|
|
9644
9645
|
person_first_name: z.string().describe('First name'),
|
|
9645
9646
|
person_last_name: z.string().describe('Last name'),
|
|
9646
|
-
person_middle_name: z.string().optional().describe('Middle name if available'),
|
|
9647
|
-
person_preferred_name: z.string().optional().describe('Preferred/nickname if different'),
|
|
9647
|
+
person_middle_name: z.string().optional().nullable().describe('Middle name if available'),
|
|
9648
|
+
person_preferred_name: z.string().optional().nullable().describe('Preferred/nickname if different'),
|
|
9648
9649
|
|
|
9649
9650
|
// Demographic Information
|
|
9650
9651
|
person_age: z.union([z.number().int().min(18).max(100), z.string().describe("Age range or 'unknown'")]).describe('Estimated age or range'),
|
|
@@ -9666,7 +9667,7 @@ export const get_person_info = async function (uid, name, email, account_profile
|
|
|
9666
9667
|
// Contact Information
|
|
9667
9668
|
person_phone: z.string().describe("Phone number or 'Not available'"),
|
|
9668
9669
|
person_email: z.string().describe('Primary email address'),
|
|
9669
|
-
person_email_alternate: z.string().optional().describe('Alternate email if available'),
|
|
9670
|
+
person_email_alternate: z.string().optional().nullable().describe('Alternate email if available'),
|
|
9670
9671
|
|
|
9671
9672
|
// Education
|
|
9672
9673
|
person_education: z.array(z.string()).describe('Array of educational institutions/degrees'),
|
|
@@ -9683,16 +9684,16 @@ export const get_person_info = async function (uid, name, email, account_profile
|
|
|
9683
9684
|
person_twitter: z.string().describe("Twitter/X profile URL or 'Not available'"),
|
|
9684
9685
|
person_github: z.string().describe("GitHub profile URL or 'Not available'"),
|
|
9685
9686
|
person_website: z.string().describe("Personal website/portfolio or 'Not available'"),
|
|
9686
|
-
person_social_other: z.array(z.string()).optional().describe('Other social media profiles'),
|
|
9687
|
+
person_social_other: z.array(z.string()).optional().nullable().describe('Other social media profiles'),
|
|
9687
9688
|
|
|
9688
9689
|
// Additional Information
|
|
9689
9690
|
person_languages: z.array(z.string()).describe('Languages spoken'),
|
|
9690
9691
|
person_interests: z.array(z.string()).describe('Professional/personal interests'),
|
|
9691
|
-
person_achievements: z.array(z.string()).optional().describe('Notable achievements/awards'),
|
|
9692
|
-
person_current_projects: z.array(z.string()).optional().describe('Current projects'),
|
|
9692
|
+
person_achievements: z.array(z.string()).optional().nullable().describe('Notable achievements/awards'),
|
|
9693
|
+
person_current_projects: z.array(z.string()).optional().nullable().describe('Current projects'),
|
|
9693
9694
|
|
|
9694
9695
|
// Context Extracted Information
|
|
9695
|
-
person_context_insights: z.array(z.string()).optional().describe('Insights extracted from provided email context'),
|
|
9696
|
+
person_context_insights: z.array(z.string()).optional().nullable().describe('Insights extracted from provided email context'),
|
|
9696
9697
|
|
|
9697
9698
|
// Metadata
|
|
9698
9699
|
person_available_for_opportunities: z.boolean().describe('Open to new opportunities'),
|
|
@@ -10270,28 +10271,28 @@ COMPANY DETECTION:
|
|
|
10270
10271
|
- Consider email context for company references
|
|
10271
10272
|
|
|
10272
10273
|
PROVIDE DETAILED ANALYSIS WITH CONFIDENCE LEVELS.`,
|
|
10273
|
-
model: 'gpt-
|
|
10274
|
+
model: 'gpt-5-nano',
|
|
10274
10275
|
response_format: z.object({
|
|
10275
10276
|
// Primary Classification
|
|
10276
10277
|
account_type: z.enum(['personal', 'business', 'ambiguous']),
|
|
10277
10278
|
account_type_confidence: z.number().min(0).max(100),
|
|
10278
10279
|
|
|
10279
10280
|
// Personal Account Details
|
|
10280
|
-
personal_account_provider: z.string().optional().describe('Email provider for personal accounts'),
|
|
10281
|
-
personal_account_type: z.enum(['primary', 'secondary', 'disposable', 'unknown']).optional(),
|
|
10282
|
-
personal_account_age_indicator: z.enum(['new', 'established', 'old', 'unknown']).optional(),
|
|
10281
|
+
personal_account_provider: z.string().optional().nullable().describe('Email provider for personal accounts'),
|
|
10282
|
+
personal_account_type: z.enum(['primary', 'secondary', 'disposable', 'unknown']).optional().nullable(),
|
|
10283
|
+
personal_account_age_indicator: z.enum(['new', 'established', 'old', 'unknown']).optional().nullable(),
|
|
10283
10284
|
|
|
10284
10285
|
// Business Account Details
|
|
10285
|
-
business_company_name: z.string().optional().describe('Company name if business account'),
|
|
10286
|
-
business_company_domain: z.string().optional().describe('Company domain'),
|
|
10287
|
-
business_account_category: z.enum(['personal_employee', 'generic_role', 'department', 'catch_all', 'unknown']).optional(),
|
|
10288
|
-
business_account_role: z.string().optional().describe('Role suggested by email address'),
|
|
10289
|
-
business_department: z.string().optional().describe('Department if applicable'),
|
|
10286
|
+
business_company_name: z.string().optional().nullable().describe('Company name if business account'),
|
|
10287
|
+
business_company_domain: z.string().optional().nullable().describe('Company domain'),
|
|
10288
|
+
business_account_category: z.enum(['personal_employee', 'generic_role', 'department', 'catch_all', 'unknown']).optional().nullable(),
|
|
10289
|
+
business_account_role: z.string().optional().nullable().describe('Role suggested by email address'),
|
|
10290
|
+
business_department: z.string().optional().nullable().describe('Department if applicable'),
|
|
10290
10291
|
|
|
10291
10292
|
// Person Analysis
|
|
10292
10293
|
is_real_person: z.boolean().describe('Whether email belongs to a real person'),
|
|
10293
10294
|
person_name_in_email: z.boolean().describe("Whether person's name appears in email address"),
|
|
10294
|
-
person_title_inferred: z.string().optional().describe('Inferred job title from email pattern'),
|
|
10295
|
+
person_title_inferred: z.string().optional().nullable().describe('Inferred job title from email pattern'),
|
|
10295
10296
|
|
|
10296
10297
|
// Email Pattern Analysis
|
|
10297
10298
|
email_pattern: z.enum([
|
|
@@ -10312,9 +10313,9 @@ PROVIDE DETAILED ANALYSIS WITH CONFIDENCE LEVELS.`,
|
|
|
10312
10313
|
]),
|
|
10313
10314
|
|
|
10314
10315
|
// Context Analysis
|
|
10315
|
-
context_supports_business: z.boolean().optional().describe('Email context suggests business use'),
|
|
10316
|
-
context_supports_personal: z.boolean().optional().describe('Email context suggests personal use'),
|
|
10317
|
-
context_company_mentions: z.array(z.string()).optional().describe('Companies mentioned in context'),
|
|
10316
|
+
context_supports_business: z.boolean().optional().nullable().describe('Email context suggests business use'),
|
|
10317
|
+
context_supports_personal: z.boolean().optional().nullable().describe('Email context suggests personal use'),
|
|
10318
|
+
context_company_mentions: z.array(z.string()).optional().nullable().describe('Companies mentioned in context'),
|
|
10318
10319
|
|
|
10319
10320
|
// Risk & Quality Assessment
|
|
10320
10321
|
is_high_quality_contact: z.boolean().describe('Good contact for professional outreach'),
|
|
@@ -10326,7 +10327,7 @@ PROVIDE DETAILED ANALYSIS WITH CONFIDENCE LEVELS.`,
|
|
|
10326
10327
|
|
|
10327
10328
|
// Metadata
|
|
10328
10329
|
analysis_timestamp: z.string().describe('When analysis was performed'),
|
|
10329
|
-
analysis_notes: z.array(z.string()).optional().describe('Key observations from analysis'),
|
|
10330
|
+
analysis_notes: z.array(z.string()).optional().nullable().describe('Key observations from analysis'),
|
|
10330
10331
|
}),
|
|
10331
10332
|
metadata: {
|
|
10332
10333
|
func: 'analyze_email_account_type',
|