@umituz/web-ai 1.0.8 → 1.0.10
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/{AIErrors-CSk4nvN1.d.ts → AIErrors-TuSFl--T.d.ts} +1 -1
- package/dist/{AIErrors-Dq9o95R_.d.cts → AIErrors-_IyXRWj1.d.cts} +1 -1
- package/dist/{cancellation-error-CpkPd67D.d.cts → cancellation-error-_39nYWwz.d.cts} +3 -3
- package/dist/{cancellation-error-Ci8fQhNF.d.ts → cancellation-error-hYcE9AS9.d.ts} +3 -3
- package/dist/chat/index.d.cts +4 -4
- package/dist/chat/index.d.ts +4 -4
- package/dist/{chat.service-BRtiA7H9.d.cts → chat.service-8MaW9pum.d.cts} +2 -2
- package/dist/{chat.service-Cqga2h1e.d.ts → chat.service-B4Isrckn.d.ts} +2 -2
- package/dist/content/index.d.cts +7 -7
- package/dist/content/index.d.ts +7 -7
- package/dist/core/index.cjs +90 -10
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +14 -27
- package/dist/core/index.d.ts +14 -27
- package/dist/core/index.js +86 -11
- package/dist/core/index.js.map +1 -1
- package/dist/{create-ai-DW7eHMBF.d.ts → create-ai-D-oEWzf9.d.ts} +3 -3
- package/dist/{create-ai-DeOpUgZ-.d.cts → create-ai-DRysRImc.d.cts} +3 -3
- package/dist/hooks/index.d.cts +9 -9
- package/dist/hooks/index.d.ts +9 -9
- package/dist/{index-Ca5o4gBK.d.ts → index-1e91KRYU.d.ts} +1 -1
- package/dist/{index-itgxPeLz.d.cts → index-Dv8gRzAu.d.cts} +1 -1
- package/dist/{index-DDzvTDg0.d.ts → index-OhvYUTXf.d.cts} +1 -2
- package/dist/{index-DDzvTDg0.d.cts → index-OhvYUTXf.d.ts} +1 -2
- package/dist/index.cjs +391 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +385 -13
- package/dist/index.js.map +1 -1
- package/dist/{provider.factory-CJuI08Xr.d.ts → provider.factory-B9RNUTYj.d.ts} +1 -1
- package/dist/{provider.factory-DG2CYFgh.d.cts → provider.factory-Ce6Een1G.d.cts} +1 -1
- package/dist/providers/index.cjs +381 -0
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.d.cts +61 -11
- package/dist/providers/index.d.ts +61 -11
- package/dist/providers/index.js +380 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/{requestQueue-D-RCbxuR.d.ts → requestQueue-AP6n_bRH.d.ts} +4 -4
- package/dist/{requestQueue-O6f8VBl5.d.cts → requestQueue-D89wx91Q.d.cts} +4 -4
- package/dist/{request-deduplicator.util-NDo0_n1y.d.cts → tool-call-accumulator-C7KhaXZA.d.cts} +20 -1
- package/dist/{request-deduplicator.util-NDo0_n1y.d.ts → tool-call-accumulator-C7KhaXZA.d.ts} +20 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as Sentiment, E as Emotion, d as ContentType, c as ContentTone } from './index-BUVULo3h.js';
|
|
2
|
-
import { A as AIError } from './index-
|
|
2
|
+
import { A as AIError } from './index-1e91KRYU.js';
|
|
3
3
|
|
|
4
4
|
interface SentimentAnalysisResult {
|
|
5
5
|
sentiment: Sentiment;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as Sentiment, E as Emotion, d as ContentType, c as ContentTone } from './index-BulSkB2L.cjs';
|
|
2
|
-
import { A as AIError } from './index-
|
|
2
|
+
import { A as AIError } from './index-Dv8gRzAu.cjs';
|
|
3
3
|
|
|
4
4
|
interface SentimentAnalysisResult {
|
|
5
5
|
sentiment: Sentiment;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { q as GroqGenerationConfig, r as GroqMessage, k as GroqChatRequest, l as GroqChatResponse, S as StreamRequestOptions, t as GroqProviderConfig } from './create-ai-
|
|
1
|
+
import { q as GroqGenerationConfig, r as GroqMessage, k as GroqChatRequest, l as GroqChatResponse, S as StreamRequestOptions, t as GroqProviderConfig } from './create-ai-DRysRImc.cjs';
|
|
2
2
|
import { C as CacheManager } from './cache-manager-Df9LLYGA.cjs';
|
|
3
|
-
import { d as ITextProvider, P as ProviderCapability, C as CostEstimateRequest } from './provider.factory-
|
|
4
|
-
import { a as StructuredTextRequest, S as StructuredGeneration, b as TextTier, T as TextRequest, G as GenerationResult, d as StreamCallbacks, P as ProviderHealth } from './index-
|
|
3
|
+
import { d as ITextProvider, P as ProviderCapability, C as CostEstimateRequest } from './provider.factory-Ce6Een1G.cjs';
|
|
4
|
+
import { a as StructuredTextRequest, S as StructuredGeneration, b as TextTier, T as TextRequest, G as GenerationResult, d as StreamCallbacks, P as ProviderHealth } from './index-OhvYUTXf.cjs';
|
|
5
5
|
|
|
6
6
|
interface TextGenerationOptions {
|
|
7
7
|
readonly model?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { q as GroqGenerationConfig, r as GroqMessage, k as GroqChatRequest, l as GroqChatResponse, S as StreamRequestOptions, t as GroqProviderConfig } from './create-ai-
|
|
1
|
+
import { q as GroqGenerationConfig, r as GroqMessage, k as GroqChatRequest, l as GroqChatResponse, S as StreamRequestOptions, t as GroqProviderConfig } from './create-ai-D-oEWzf9.js';
|
|
2
2
|
import { C as CacheManager } from './cache-manager-Df9LLYGA.js';
|
|
3
|
-
import { d as ITextProvider, P as ProviderCapability, C as CostEstimateRequest } from './provider.factory-
|
|
4
|
-
import { a as StructuredTextRequest, S as StructuredGeneration, b as TextTier, T as TextRequest, G as GenerationResult, d as StreamCallbacks, P as ProviderHealth } from './index-
|
|
3
|
+
import { d as ITextProvider, P as ProviderCapability, C as CostEstimateRequest } from './provider.factory-B9RNUTYj.js';
|
|
4
|
+
import { a as StructuredTextRequest, S as StructuredGeneration, b as TextTier, T as TextRequest, G as GenerationResult, d as StreamCallbacks, P as ProviderHealth } from './index-OhvYUTXf.js';
|
|
5
5
|
|
|
6
6
|
interface TextGenerationOptions {
|
|
7
7
|
readonly model?: string;
|
package/dist/chat/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h as IMessageFormatter, f as ChatMessage } from '../chat.service-
|
|
2
|
-
export { C as ChatConfig, a as ChatConversation, b as ChatMessageSender, c as ChatMessageType, d as ChatService, e as ChatTokenUsage, D as DEFAULT_PROMPT_STRATEGY, I as IChatService, g as IChatStorage, S as SendMessageInput, i as SendMessageResult, j as SystemPromptStrategy, U as UseChatOptions, k as UseChatReturn, l as extractTokenUsage } from '../chat.service-
|
|
3
|
-
import { C as ChatMessage$1 } from '../index-
|
|
4
|
-
import '../provider.factory-
|
|
1
|
+
import { h as IMessageFormatter, f as ChatMessage } from '../chat.service-8MaW9pum.cjs';
|
|
2
|
+
export { C as ChatConfig, a as ChatConversation, b as ChatMessageSender, c as ChatMessageType, d as ChatService, e as ChatTokenUsage, D as DEFAULT_PROMPT_STRATEGY, I as IChatService, g as IChatStorage, S as SendMessageInput, i as SendMessageResult, j as SystemPromptStrategy, U as UseChatOptions, k as UseChatReturn, l as extractTokenUsage } from '../chat.service-8MaW9pum.cjs';
|
|
3
|
+
import { C as ChatMessage$1 } from '../index-OhvYUTXf.cjs';
|
|
4
|
+
import '../provider.factory-Ce6Een1G.cjs';
|
|
5
5
|
import '../ProviderConfig-DIFa9nmG.cjs';
|
|
6
6
|
|
|
7
7
|
declare class ChatIdGenerator {
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h as IMessageFormatter, f as ChatMessage } from '../chat.service-
|
|
2
|
-
export { C as ChatConfig, a as ChatConversation, b as ChatMessageSender, c as ChatMessageType, d as ChatService, e as ChatTokenUsage, D as DEFAULT_PROMPT_STRATEGY, I as IChatService, g as IChatStorage, S as SendMessageInput, i as SendMessageResult, j as SystemPromptStrategy, U as UseChatOptions, k as UseChatReturn, l as extractTokenUsage } from '../chat.service-
|
|
3
|
-
import { C as ChatMessage$1 } from '../index-
|
|
4
|
-
import '../provider.factory-
|
|
1
|
+
import { h as IMessageFormatter, f as ChatMessage } from '../chat.service-B4Isrckn.js';
|
|
2
|
+
export { C as ChatConfig, a as ChatConversation, b as ChatMessageSender, c as ChatMessageType, d as ChatService, e as ChatTokenUsage, D as DEFAULT_PROMPT_STRATEGY, I as IChatService, g as IChatStorage, S as SendMessageInput, i as SendMessageResult, j as SystemPromptStrategy, U as UseChatOptions, k as UseChatReturn, l as extractTokenUsage } from '../chat.service-B4Isrckn.js';
|
|
3
|
+
import { C as ChatMessage$1 } from '../index-OhvYUTXf.js';
|
|
4
|
+
import '../provider.factory-B9RNUTYj.js';
|
|
5
5
|
import '../ProviderConfig-DIFa9nmG.js';
|
|
6
6
|
|
|
7
7
|
declare class ChatIdGenerator {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as TextTier, C as ChatMessage$1 } from './index-
|
|
2
|
-
import { d as ITextProvider, e as ProviderFactory } from './provider.factory-
|
|
1
|
+
import { b as TextTier, C as ChatMessage$1 } from './index-OhvYUTXf.cjs';
|
|
2
|
+
import { d as ITextProvider, e as ProviderFactory } from './provider.factory-Ce6Een1G.cjs';
|
|
3
3
|
|
|
4
4
|
type ChatMessageSender = "user" | "assistant" | "system";
|
|
5
5
|
type ChatMessageType = "text" | "image" | "audio" | "sticker";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as TextTier, C as ChatMessage$1 } from './index-
|
|
2
|
-
import { d as ITextProvider, e as ProviderFactory } from './provider.factory-
|
|
1
|
+
import { b as TextTier, C as ChatMessage$1 } from './index-OhvYUTXf.js';
|
|
2
|
+
import { d as ITextProvider, e as ProviderFactory } from './provider.factory-B9RNUTYj.js';
|
|
3
3
|
|
|
4
4
|
type ChatMessageSender = "user" | "assistant" | "system";
|
|
5
5
|
type ChatMessageType = "text" | "image" | "audio" | "sticker";
|
package/dist/content/index.d.cts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { n as SocialPlatform, l as PlatformSpecs } from '../index-BulSkB2L.cjs';
|
|
2
2
|
export { B as BlogGenerationRequest, a as BlogType, C as CONTENT_WIZARD_STEPS, b as ContentCalendarEntry, c as ContentTone, d as ContentType, e as ContentWizardData, f as ContentWizardStep, g as ContentWizardType, E as Emotion, G as GeneratedBlog, h as GeneratedSocialContent, i as GeneratedVideoScript, I as IMAGE_WIZARD_STEPS, j as ImageWizardData, k as ImageWizardStep, P as PLATFORM_SPECS, S as Sentiment, m as SocialContentRequest, V as VIDEO_WIZARD_STEPS, o as ValidationResult, p as VideoGenerationType, q as VideoScriptRequest, r as VideoWizardData, s as VideoWizardStep, W as WizardConfig, t as WizardData, u as WizardStep, v as buildContentRequest, w as buildImageRequest, x as buildVideoRequest } from '../index-BulSkB2L.cjs';
|
|
3
|
-
import { m as GenerationType } from '../AIErrors-
|
|
4
|
-
export { A as ABTestComparison, a as ABTestPrediction, b as ABTestRequest, c as ABTestVariant, d as AIErrorCode, e as ASPECT_RATIO_OPTIONS, y as AnyQuality, f as AspectRatio, z as AspectRatioOption, i as CREDIT_COSTS, C as ContentAnalysisRequest, g as ContentAnalysisResult, G as ContentGenerationResult, h as CreditCost, D as DEFAULT_CREDIT_COST, E as EmotionScore, i as GENERATION_COSTS, j as GenerationMetadata, k as GenerationProgress, G as GenerationResult, l as GenerationStatus, I as IMAGE_QUALITY_OPTIONS, n as ImageGenerationInput, o as ImageQuality, B as ImageQualityOption, F as ImageStyle, K as KeywordAnalysis, M as MOTION_OPTIONS, H as MotionOption, J as MotionStrength, P as ProviderQuotaExhaustedError, p as ProviderUnavailableError, Q as QualityTier, S as SEOOptimizationRequest, q as SEOOptimizationResult, r as SEOScoreBreakdown, s as STYLE_PRESETS, t as SentimentAnalysisResult, L as StylePreset, V as VIDEO_DURATION_OPTIONS_SECONDS, u as VIDEO_QUALITY_OPTIONS, N as ValidationError, v as VideoGenerationInput, w as VideoQuality, O as VideoQualityOption, x as calculateContentCreditCost, x as calculateCreditCost, R as toQualityTier } from '../AIErrors-
|
|
3
|
+
import { m as GenerationType } from '../AIErrors-_IyXRWj1.cjs';
|
|
4
|
+
export { A as ABTestComparison, a as ABTestPrediction, b as ABTestRequest, c as ABTestVariant, d as AIErrorCode, e as ASPECT_RATIO_OPTIONS, y as AnyQuality, f as AspectRatio, z as AspectRatioOption, i as CREDIT_COSTS, C as ContentAnalysisRequest, g as ContentAnalysisResult, G as ContentGenerationResult, h as CreditCost, D as DEFAULT_CREDIT_COST, E as EmotionScore, i as GENERATION_COSTS, j as GenerationMetadata, k as GenerationProgress, G as GenerationResult, l as GenerationStatus, I as IMAGE_QUALITY_OPTIONS, n as ImageGenerationInput, o as ImageQuality, B as ImageQualityOption, F as ImageStyle, K as KeywordAnalysis, M as MOTION_OPTIONS, H as MotionOption, J as MotionStrength, P as ProviderQuotaExhaustedError, p as ProviderUnavailableError, Q as QualityTier, S as SEOOptimizationRequest, q as SEOOptimizationResult, r as SEOScoreBreakdown, s as STYLE_PRESETS, t as SentimentAnalysisResult, L as StylePreset, V as VIDEO_DURATION_OPTIONS_SECONDS, u as VIDEO_QUALITY_OPTIONS, N as ValidationError, v as VideoGenerationInput, w as VideoQuality, O as VideoQualityOption, x as calculateContentCreditCost, x as calculateCreditCost, R as toQualityTier } from '../AIErrors-_IyXRWj1.cjs';
|
|
5
5
|
import { I as ImageGenerationRequest, V as VideoGenerationRequest, T as TextGenerationRequest } from '../ProviderConfig-DIFa9nmG.cjs';
|
|
6
6
|
export { A as AnthropicConfig, B as BaseProviderConfig, F as FalConfig, c as GeminiConfig, G as GeneratedContent, e as GenerationRequest, f as GroqConfig, a as ImageToVideoRequest, d as ProviderConfig, g as ProviderHealth, h as ProviderType, P as PrunaConfig, b as VideoToVideoRequest } from '../ProviderConfig-DIFa9nmG.cjs';
|
|
7
|
-
export { A as ABTestService, a as AIContentService, b as ASPECT_RATIO_VALUES, c as AnalysisService, B as BlogService, C as ContentCalendarService, n as ContentRequestQueue, G as GenerationExecutor, I as IAIContentService, d as IMAGE_QUALITY_VALUES, e as ImagePromptService, M as MediaGenerationService, P as PromptBuilder, Q as QueueConfig, R as RequestPriority, S as SeoService, f as SocialService, V as VIDEO_DURATION_OPTIONS, g as VIDEO_QUALITY_VALUES, h as VideoScriptService, i as batchRequest, j as extractJSON, k as getDimensionsForAspectRatio, l as getRecommendedQuality, m as isValidJSON, p as parseAIResponse, r as recommendQualityForAspectRatio, o as resolveDimensionsForAspectRatio, s as safeJSONParse } from '../requestQueue-
|
|
8
|
-
export { c as ITextGenerator, T as TextGenerationOptions } from '../provider.factory-
|
|
9
|
-
export { A as AIError } from '../index-
|
|
10
|
-
import '../create-ai-
|
|
11
|
-
import '../index-
|
|
7
|
+
export { A as ABTestService, a as AIContentService, b as ASPECT_RATIO_VALUES, c as AnalysisService, B as BlogService, C as ContentCalendarService, n as ContentRequestQueue, G as GenerationExecutor, I as IAIContentService, d as IMAGE_QUALITY_VALUES, e as ImagePromptService, M as MediaGenerationService, P as PromptBuilder, Q as QueueConfig, R as RequestPriority, S as SeoService, f as SocialService, V as VIDEO_DURATION_OPTIONS, g as VIDEO_QUALITY_VALUES, h as VideoScriptService, i as batchRequest, j as extractJSON, k as getDimensionsForAspectRatio, l as getRecommendedQuality, m as isValidJSON, p as parseAIResponse, r as recommendQualityForAspectRatio, o as resolveDimensionsForAspectRatio, s as safeJSONParse } from '../requestQueue-D89wx91Q.cjs';
|
|
8
|
+
export { c as ITextGenerator, T as TextGenerationOptions } from '../provider.factory-Ce6Een1G.cjs';
|
|
9
|
+
export { A as AIError } from '../index-Dv8gRzAu.cjs';
|
|
10
|
+
import '../create-ai-DRysRImc.cjs';
|
|
11
|
+
import '../index-OhvYUTXf.cjs';
|
|
12
12
|
|
|
13
13
|
declare const ValidationLimits: {
|
|
14
14
|
readonly TOPIC: {
|
package/dist/content/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { n as SocialPlatform, l as PlatformSpecs } from '../index-BUVULo3h.js';
|
|
2
2
|
export { B as BlogGenerationRequest, a as BlogType, C as CONTENT_WIZARD_STEPS, b as ContentCalendarEntry, c as ContentTone, d as ContentType, e as ContentWizardData, f as ContentWizardStep, g as ContentWizardType, E as Emotion, G as GeneratedBlog, h as GeneratedSocialContent, i as GeneratedVideoScript, I as IMAGE_WIZARD_STEPS, j as ImageWizardData, k as ImageWizardStep, P as PLATFORM_SPECS, S as Sentiment, m as SocialContentRequest, V as VIDEO_WIZARD_STEPS, o as ValidationResult, p as VideoGenerationType, q as VideoScriptRequest, r as VideoWizardData, s as VideoWizardStep, W as WizardConfig, t as WizardData, u as WizardStep, v as buildContentRequest, w as buildImageRequest, x as buildVideoRequest } from '../index-BUVULo3h.js';
|
|
3
|
-
import { m as GenerationType } from '../AIErrors-
|
|
4
|
-
export { A as ABTestComparison, a as ABTestPrediction, b as ABTestRequest, c as ABTestVariant, d as AIErrorCode, e as ASPECT_RATIO_OPTIONS, y as AnyQuality, f as AspectRatio, z as AspectRatioOption, i as CREDIT_COSTS, C as ContentAnalysisRequest, g as ContentAnalysisResult, G as ContentGenerationResult, h as CreditCost, D as DEFAULT_CREDIT_COST, E as EmotionScore, i as GENERATION_COSTS, j as GenerationMetadata, k as GenerationProgress, G as GenerationResult, l as GenerationStatus, I as IMAGE_QUALITY_OPTIONS, n as ImageGenerationInput, o as ImageQuality, B as ImageQualityOption, F as ImageStyle, K as KeywordAnalysis, M as MOTION_OPTIONS, H as MotionOption, J as MotionStrength, P as ProviderQuotaExhaustedError, p as ProviderUnavailableError, Q as QualityTier, S as SEOOptimizationRequest, q as SEOOptimizationResult, r as SEOScoreBreakdown, s as STYLE_PRESETS, t as SentimentAnalysisResult, L as StylePreset, V as VIDEO_DURATION_OPTIONS_SECONDS, u as VIDEO_QUALITY_OPTIONS, N as ValidationError, v as VideoGenerationInput, w as VideoQuality, O as VideoQualityOption, x as calculateContentCreditCost, x as calculateCreditCost, R as toQualityTier } from '../AIErrors-
|
|
3
|
+
import { m as GenerationType } from '../AIErrors-TuSFl--T.js';
|
|
4
|
+
export { A as ABTestComparison, a as ABTestPrediction, b as ABTestRequest, c as ABTestVariant, d as AIErrorCode, e as ASPECT_RATIO_OPTIONS, y as AnyQuality, f as AspectRatio, z as AspectRatioOption, i as CREDIT_COSTS, C as ContentAnalysisRequest, g as ContentAnalysisResult, G as ContentGenerationResult, h as CreditCost, D as DEFAULT_CREDIT_COST, E as EmotionScore, i as GENERATION_COSTS, j as GenerationMetadata, k as GenerationProgress, G as GenerationResult, l as GenerationStatus, I as IMAGE_QUALITY_OPTIONS, n as ImageGenerationInput, o as ImageQuality, B as ImageQualityOption, F as ImageStyle, K as KeywordAnalysis, M as MOTION_OPTIONS, H as MotionOption, J as MotionStrength, P as ProviderQuotaExhaustedError, p as ProviderUnavailableError, Q as QualityTier, S as SEOOptimizationRequest, q as SEOOptimizationResult, r as SEOScoreBreakdown, s as STYLE_PRESETS, t as SentimentAnalysisResult, L as StylePreset, V as VIDEO_DURATION_OPTIONS_SECONDS, u as VIDEO_QUALITY_OPTIONS, N as ValidationError, v as VideoGenerationInput, w as VideoQuality, O as VideoQualityOption, x as calculateContentCreditCost, x as calculateCreditCost, R as toQualityTier } from '../AIErrors-TuSFl--T.js';
|
|
5
5
|
import { I as ImageGenerationRequest, V as VideoGenerationRequest, T as TextGenerationRequest } from '../ProviderConfig-DIFa9nmG.js';
|
|
6
6
|
export { A as AnthropicConfig, B as BaseProviderConfig, F as FalConfig, c as GeminiConfig, G as GeneratedContent, e as GenerationRequest, f as GroqConfig, a as ImageToVideoRequest, d as ProviderConfig, g as ProviderHealth, h as ProviderType, P as PrunaConfig, b as VideoToVideoRequest } from '../ProviderConfig-DIFa9nmG.js';
|
|
7
|
-
export { A as ABTestService, a as AIContentService, b as ASPECT_RATIO_VALUES, c as AnalysisService, B as BlogService, C as ContentCalendarService, n as ContentRequestQueue, G as GenerationExecutor, I as IAIContentService, d as IMAGE_QUALITY_VALUES, e as ImagePromptService, M as MediaGenerationService, P as PromptBuilder, Q as QueueConfig, R as RequestPriority, S as SeoService, f as SocialService, V as VIDEO_DURATION_OPTIONS, g as VIDEO_QUALITY_VALUES, h as VideoScriptService, i as batchRequest, j as extractJSON, k as getDimensionsForAspectRatio, l as getRecommendedQuality, m as isValidJSON, p as parseAIResponse, r as recommendQualityForAspectRatio, o as resolveDimensionsForAspectRatio, s as safeJSONParse } from '../requestQueue-
|
|
8
|
-
export { c as ITextGenerator, T as TextGenerationOptions } from '../provider.factory-
|
|
9
|
-
export { A as AIError } from '../index-
|
|
10
|
-
import '../create-ai-
|
|
11
|
-
import '../index-
|
|
7
|
+
export { A as ABTestService, a as AIContentService, b as ASPECT_RATIO_VALUES, c as AnalysisService, B as BlogService, C as ContentCalendarService, n as ContentRequestQueue, G as GenerationExecutor, I as IAIContentService, d as IMAGE_QUALITY_VALUES, e as ImagePromptService, M as MediaGenerationService, P as PromptBuilder, Q as QueueConfig, R as RequestPriority, S as SeoService, f as SocialService, V as VIDEO_DURATION_OPTIONS, g as VIDEO_QUALITY_VALUES, h as VideoScriptService, i as batchRequest, j as extractJSON, k as getDimensionsForAspectRatio, l as getRecommendedQuality, m as isValidJSON, p as parseAIResponse, r as recommendQualityForAspectRatio, o as resolveDimensionsForAspectRatio, s as safeJSONParse } from '../requestQueue-AP6n_bRH.js';
|
|
8
|
+
export { c as ITextGenerator, T as TextGenerationOptions } from '../provider.factory-B9RNUTYj.js';
|
|
9
|
+
export { A as AIError } from '../index-1e91KRYU.js';
|
|
10
|
+
import '../create-ai-D-oEWzf9.js';
|
|
11
|
+
import '../index-OhvYUTXf.js';
|
|
12
12
|
|
|
13
13
|
declare const ValidationLimits: {
|
|
14
14
|
readonly TOPIC: {
|
package/dist/core/index.cjs
CHANGED
|
@@ -1134,6 +1134,83 @@ ${paragraph}`;
|
|
|
1134
1134
|
return chunks.map((chunk) => chunk.length > maxChars ? chunk.slice(0, maxChars) : chunk).filter((chunk) => chunk.length > 0);
|
|
1135
1135
|
}
|
|
1136
1136
|
|
|
1137
|
+
// src/core/parsers/text-extract.ts
|
|
1138
|
+
var TEXT_MIME_PREFIX = "text/";
|
|
1139
|
+
var TEXT_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
1140
|
+
"application/json",
|
|
1141
|
+
"application/xml",
|
|
1142
|
+
"application/yaml",
|
|
1143
|
+
"application/x-yaml",
|
|
1144
|
+
"application/javascript",
|
|
1145
|
+
"application/typescript",
|
|
1146
|
+
"application/x-sh",
|
|
1147
|
+
"application/sql",
|
|
1148
|
+
"text/csv"
|
|
1149
|
+
]);
|
|
1150
|
+
var TEXT_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
1151
|
+
"txt",
|
|
1152
|
+
"md",
|
|
1153
|
+
"markdown",
|
|
1154
|
+
"csv",
|
|
1155
|
+
"tsv",
|
|
1156
|
+
"json",
|
|
1157
|
+
"xml",
|
|
1158
|
+
"yaml",
|
|
1159
|
+
"yml",
|
|
1160
|
+
"toml",
|
|
1161
|
+
"ini",
|
|
1162
|
+
"js",
|
|
1163
|
+
"mjs",
|
|
1164
|
+
"cjs",
|
|
1165
|
+
"ts",
|
|
1166
|
+
"tsx",
|
|
1167
|
+
"jsx",
|
|
1168
|
+
"py",
|
|
1169
|
+
"rb",
|
|
1170
|
+
"go",
|
|
1171
|
+
"rs",
|
|
1172
|
+
"java",
|
|
1173
|
+
"kt",
|
|
1174
|
+
"swift",
|
|
1175
|
+
"c",
|
|
1176
|
+
"h",
|
|
1177
|
+
"cpp",
|
|
1178
|
+
"hpp",
|
|
1179
|
+
"cs",
|
|
1180
|
+
"php",
|
|
1181
|
+
"sh",
|
|
1182
|
+
"bash",
|
|
1183
|
+
"zsh",
|
|
1184
|
+
"sql",
|
|
1185
|
+
"html",
|
|
1186
|
+
"css",
|
|
1187
|
+
"scss",
|
|
1188
|
+
"env"
|
|
1189
|
+
]);
|
|
1190
|
+
var TEXT_EXTRACT_PER_FILE_LIMIT = 24e3;
|
|
1191
|
+
var TEXT_EXTRACT_TOTAL_LIMIT = 48e3;
|
|
1192
|
+
function isTextLike(mimeType, name) {
|
|
1193
|
+
if (mimeType.startsWith(TEXT_MIME_PREFIX) || TEXT_MIME_TYPES.has(mimeType)) return true;
|
|
1194
|
+
const extension = name.split(".").pop()?.toLowerCase() ?? "";
|
|
1195
|
+
return TEXT_EXTENSIONS.has(extension);
|
|
1196
|
+
}
|
|
1197
|
+
function extractText(bytes) {
|
|
1198
|
+
let out = "";
|
|
1199
|
+
const decoder = new TextDecoder("utf-8", { fatal: false });
|
|
1200
|
+
const chunkSize = 65536;
|
|
1201
|
+
for (let offset = 0; offset < bytes.length; offset += chunkSize) {
|
|
1202
|
+
out += decoder.decode(bytes.subarray(offset, Math.min(offset + chunkSize, bytes.length)), {
|
|
1203
|
+
stream: offset + chunkSize < bytes.length
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1206
|
+
return out.split("\0").join("");
|
|
1207
|
+
}
|
|
1208
|
+
function capText(text, limit) {
|
|
1209
|
+
if (text.length <= limit) return text;
|
|
1210
|
+
return `${text.slice(0, limit)}
|
|
1211
|
+
[truncated]`;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1137
1214
|
// src/core/calculations/random-base36-suffix.ts
|
|
1138
1215
|
var BASE_36_RADIX = 36;
|
|
1139
1216
|
var DECIMAL_OFFSET = 2;
|
|
@@ -1369,17 +1446,19 @@ function buildSystemPrompt(input = {}) {
|
|
|
1369
1446
|
const now = input.now ?? /* @__PURE__ */ new Date();
|
|
1370
1447
|
const identity = input.identity ?? DEFAULT_AI_IDENTITY;
|
|
1371
1448
|
const parts = [identity, `Current date: ${now.toISOString().slice(0, 10)}.`];
|
|
1449
|
+
const projectName = input.project?.name;
|
|
1372
1450
|
const projectInstructions = input.project?.instructions?.trim();
|
|
1373
|
-
if (projectInstructions) {
|
|
1451
|
+
if (projectName && projectInstructions) {
|
|
1374
1452
|
parts.push(
|
|
1375
|
-
`The user is working inside the project "${
|
|
1453
|
+
`The user is working inside the project "${projectName}". Follow these project instructions:
|
|
1376
1454
|
${projectInstructions}`
|
|
1377
1455
|
);
|
|
1378
1456
|
}
|
|
1457
|
+
const agentName = input.agent?.name;
|
|
1379
1458
|
const agentInstructions = input.agent?.instructions?.trim();
|
|
1380
|
-
if (agentInstructions) {
|
|
1459
|
+
if (agentName && agentInstructions) {
|
|
1381
1460
|
parts.push(
|
|
1382
|
-
`You are operating as the agent "${
|
|
1461
|
+
`You are operating as the agent "${agentName}". Follow these agent instructions:
|
|
1383
1462
|
${agentInstructions}`
|
|
1384
1463
|
);
|
|
1385
1464
|
}
|
|
@@ -1581,11 +1660,7 @@ function resolveTimestamp(value) {
|
|
|
1581
1660
|
const parsed = Date.parse(value);
|
|
1582
1661
|
return Number.isNaN(parsed) ? 0 : parsed;
|
|
1583
1662
|
}
|
|
1584
|
-
function
|
|
1585
|
-
if (str.length <= maxLength) return str;
|
|
1586
|
-
return str.slice(0, Math.max(maxLength, 0));
|
|
1587
|
-
}
|
|
1588
|
-
function selectMemories(rows, maxItems = MEMORY_MAX_ITEMS, totalLimit = MEMORY_TOTAL_LIMIT) {
|
|
1663
|
+
function selectMemories(rows, maxItems = MEMORY_MAX_ITEMS, totalLimit = MEMORY_TOTAL_LIMIT, capper = capText) {
|
|
1589
1664
|
const ordered = [...rows].sort((a, b) => {
|
|
1590
1665
|
if (a.pinned !== b.pinned) return a.pinned ? -1 : 1;
|
|
1591
1666
|
return resolveTimestamp(b.updatedAt) - resolveTimestamp(a.updatedAt);
|
|
@@ -1596,7 +1671,7 @@ function selectMemories(rows, maxItems = MEMORY_MAX_ITEMS, totalLimit = MEMORY_T
|
|
|
1596
1671
|
if (out.length >= maxItems || used >= totalLimit) break;
|
|
1597
1672
|
const content = row.content.trim();
|
|
1598
1673
|
if (content.length === 0) continue;
|
|
1599
|
-
const capped =
|
|
1674
|
+
const capped = capper(content, totalLimit - used);
|
|
1600
1675
|
out.push(capped);
|
|
1601
1676
|
used += capped.length;
|
|
1602
1677
|
}
|
|
@@ -1879,6 +1954,8 @@ exports.STATUS_TO_CODE = STATUS_TO_CODE;
|
|
|
1879
1954
|
exports.SYSTEM_PROMPT_VERSION = SYSTEM_PROMPT_VERSION;
|
|
1880
1955
|
exports.StreamingResponseParser = StreamingResponseParser;
|
|
1881
1956
|
exports.StructuredPromptBuilder = StructuredPromptBuilder;
|
|
1957
|
+
exports.TEXT_EXTRACT_PER_FILE_LIMIT = TEXT_EXTRACT_PER_FILE_LIMIT;
|
|
1958
|
+
exports.TEXT_EXTRACT_TOTAL_LIMIT = TEXT_EXTRACT_TOTAL_LIMIT;
|
|
1882
1959
|
exports.TEXT_TIERS = TEXT_TIERS;
|
|
1883
1960
|
exports.TRANSIENT_ERROR_CODES = TRANSIENT_ERROR_CODES;
|
|
1884
1961
|
exports.ThrottleManager = ThrottleManager;
|
|
@@ -1903,6 +1980,7 @@ exports.calculateExponentialBackoff = calculateExponentialBackoff;
|
|
|
1903
1980
|
exports.calculateTrailingDelay = calculateTrailingDelay;
|
|
1904
1981
|
exports.canFailover = canFailover;
|
|
1905
1982
|
exports.canStartTask = canStartTask;
|
|
1983
|
+
exports.capText = capText;
|
|
1906
1984
|
exports.chunkText = chunkText;
|
|
1907
1985
|
exports.clampScore = clampScore;
|
|
1908
1986
|
exports.classifyHttpStatus = classifyHttpStatus;
|
|
@@ -1928,6 +2006,7 @@ exports.extractJsonCandidate = extractJsonCandidate;
|
|
|
1928
2006
|
exports.extractJsonFromCodeFence = extractJsonFromCodeFence;
|
|
1929
2007
|
exports.extractJsonObject = extractJsonObject;
|
|
1930
2008
|
exports.extractSseDataPayload = extractSseDataPayload;
|
|
2009
|
+
exports.extractText = extractText;
|
|
1931
2010
|
exports.failoverCandidate = failoverCandidate;
|
|
1932
2011
|
exports.findTopKSimilar = findTopKSimilar;
|
|
1933
2012
|
exports.formatCost = formatCost;
|
|
@@ -1938,6 +2017,7 @@ exports.isAuthErrorType = isAuthErrorType;
|
|
|
1938
2017
|
exports.isRetryableErrorType = isRetryableErrorType;
|
|
1939
2018
|
exports.isSseDataLine = isSseDataLine;
|
|
1940
2019
|
exports.isSseDoneMarker = isSseDoneMarker;
|
|
2020
|
+
exports.isTextLike = isTextLike;
|
|
1941
2021
|
exports.isTextTier = isTextTier;
|
|
1942
2022
|
exports.isTransientError = isTransientError;
|
|
1943
2023
|
exports.isValidApiKey = isValidApiKey;
|