@applica-software-guru/persona-sdk 0.1.29 → 0.1.31
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.ts +20 -10
- package/package.json +1 -1
- package/src/agents/types.ts +19 -70
- package/src/index.ts +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare interface Agent {
|
|
|
31
31
|
toolkit?: ToolkitConfiguration;
|
|
32
32
|
shortTermMemory?: StmConfiguration;
|
|
33
33
|
contextManagement?: ContextManagementConfiguration;
|
|
34
|
+
attachmentsPreprocessor?: AttachmentsPreprocessorConfiguration;
|
|
34
35
|
responseSchema?: Record<string, unknown>;
|
|
35
36
|
verboseErrors?: boolean;
|
|
36
37
|
}
|
|
@@ -65,6 +66,7 @@ export declare interface AgentCreateRequest {
|
|
|
65
66
|
toolkit?: ToolkitConfiguration;
|
|
66
67
|
shortTermMemory?: StmConfiguration;
|
|
67
68
|
contextManagement?: ContextManagementConfiguration;
|
|
69
|
+
attachmentsPreprocessor?: AttachmentsPreprocessorConfiguration;
|
|
68
70
|
responseSchema?: Record<string, unknown>;
|
|
69
71
|
verboseErrors?: boolean;
|
|
70
72
|
}
|
|
@@ -114,6 +116,19 @@ export declare class ApiKeyAuthenticationProvider implements AuthenticationProvi
|
|
|
114
116
|
getCredentials(): string;
|
|
115
117
|
}
|
|
116
118
|
|
|
119
|
+
export declare interface AttachmentsPreprocessorConfiguration {
|
|
120
|
+
enabled?: boolean;
|
|
121
|
+
imageHandling?: AttachmentsPreprocessorImageHandling;
|
|
122
|
+
standalonePassthrough?: boolean;
|
|
123
|
+
secondaryModel?: ModelConfiguration;
|
|
124
|
+
llmPrompt?: string;
|
|
125
|
+
pdfImageDpi?: number;
|
|
126
|
+
maxPages?: number;
|
|
127
|
+
failOpen?: boolean;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export declare type AttachmentsPreprocessorImageHandling = 'drop' | 'describe' | 'keep';
|
|
131
|
+
|
|
117
132
|
export declare interface AuthenticationProvider {
|
|
118
133
|
applyHeaders(headers: Headers): void;
|
|
119
134
|
getCredentials(): string;
|
|
@@ -250,7 +265,7 @@ export declare interface ContentValue {
|
|
|
250
265
|
content?: ContentItem[];
|
|
251
266
|
}
|
|
252
267
|
|
|
253
|
-
declare interface ContextManagementConfiguration {
|
|
268
|
+
export declare interface ContextManagementConfiguration {
|
|
254
269
|
enabled?: boolean;
|
|
255
270
|
maxContextTokens?: number;
|
|
256
271
|
summarizationThreshold?: number;
|
|
@@ -678,13 +693,8 @@ export declare class MissionsApi extends HttpApi {
|
|
|
678
693
|
export declare type MissionStatus = 'draft' | 'planned' | 'active' | 'review' | 'paused' | 'completed' | 'failed' | 'cancelled';
|
|
679
694
|
|
|
680
695
|
export declare interface ModelConfiguration {
|
|
681
|
-
/**
|
|
682
|
-
|
|
683
|
-
* names (e.g. "gpt-5", "accounts/fireworks/models/x", "ollama") are still
|
|
684
|
-
* accepted; the provider is derived server-side. The `ModelName` union keeps
|
|
685
|
-
* autocomplete for known models while `string` allows any litellm identifier.
|
|
686
|
-
*/
|
|
687
|
-
modelName?: ModelName | (string & {});
|
|
696
|
+
/** litellm-style "<provider>/<model>" string (e.g. "fireworks/accounts/fireworks/models/minimax-m3"). Use the known-models API for the current list. */
|
|
697
|
+
modelName?: string;
|
|
688
698
|
temperature?: number;
|
|
689
699
|
reasoningEffort?: ReasoningEffort;
|
|
690
700
|
/** Maximum number of output tokens to generate. Undefined = provider default. */
|
|
@@ -693,6 +703,8 @@ export declare interface ModelConfiguration {
|
|
|
693
703
|
apiKey?: string;
|
|
694
704
|
/** Override the per-provider default base URL when set. */
|
|
695
705
|
baseUrl?: string;
|
|
706
|
+
/** Passed verbatim as extra_body to the underlying LLM request (e.g. { service_tier: "priority" }). */
|
|
707
|
+
extraBody?: Record<string, unknown>;
|
|
696
708
|
/** @deprecated use `baseUrl`. Kept for backward compatibility. */
|
|
697
709
|
url?: string;
|
|
698
710
|
/** @deprecated use litellm `modelName` (e.g. "ollama/llama3.1"). */
|
|
@@ -705,8 +717,6 @@ export declare interface ModelConfiguration {
|
|
|
705
717
|
openrouterModelName?: string;
|
|
706
718
|
}
|
|
707
719
|
|
|
708
|
-
export declare type ModelName = 'gemini-3.5-flash' | 'gemini-3-pro' | 'gemini-3-flash-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-lite' | 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-2.0-flash' | 'gemini-1.5-flash' | 'gemini-1.5-pro' | 'gemini-2.5-pro-exp-03-25' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-001' | 'gemini-1.5-flash-latest' | 'gemini-1.5-flash-001' | 'gemini-1.5-flash-002' | 'gemini-1.5-pro-latest' | 'gemini-1.5-pro-001' | 'gemini-1.5-pro-002' | 'gpt-5.5' | 'gpt-5.4' | 'gpt-5.3' | 'gpt-5.2' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4o' | 'gpt-4o-mini' | 'gpt-4.5' | 'o1' | 'o1-mini' | 'o3-mini' | 'o4-mini' | 'o4-mini-high' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'accounts/fireworks/models/minimax-m2p7' | 'accounts/fireworks/models/minimax-m2p5' | 'accounts/fireworks/models/deepseek-v3p2' | 'accounts/fireworks/models/kimi-k2p5' | 'accounts/fireworks/models/glm-5' | 'accounts/fireworks/models/glm-5p1' | 'accounts/fireworks/models/deepseek-v4-pro' | 'accounts/fireworks/models/qwen3p6-plus' | 'grok-4.3' | 'grok-4-1-fast-reasoning' | 'grok-4-1-fast-non-reasoning' | 'grok-code-fast-1' | 'grok-4-fast-reasoning' | 'grok-4-fast-non-reasoning' | 'grok-4-0709' | 'grok-3-mini' | 'grok-3' | 'grok-2-vision-1212' | 'ollama' | 'openai-compatible' | 'openrouter';
|
|
709
|
-
|
|
710
720
|
export declare type ModelProvider = 'google' | 'openai' | 'grok' | 'fireworks' | 'together' | 'ollama' | 'openai_compatible' | 'openrouter';
|
|
711
721
|
|
|
712
722
|
export declare interface NetworkConfiguration {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@applica-software-guru/persona-sdk",
|
|
3
3
|
"description": "Official TypeScript SDK for the Persona API — manage agents, sessions, projects, knowledge bases, workflows, triggers and more.",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.31",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"dev": "vite",
|
package/src/agents/types.ts
CHANGED
|
@@ -4,69 +4,6 @@ export type KnowledgeType = 'multi_hop' | 'simple';
|
|
|
4
4
|
|
|
5
5
|
export type LanguageCode = 'en-US' | 'it-IT' | 'es-ES' | 'fr-FR' | 'de-DE' | 'pt-BR';
|
|
6
6
|
|
|
7
|
-
export type ModelName =
|
|
8
|
-
| 'gemini-3.5-flash'
|
|
9
|
-
| 'gemini-3-pro'
|
|
10
|
-
| 'gemini-3-flash-preview'
|
|
11
|
-
| 'gemini-3.1-pro-preview'
|
|
12
|
-
| 'gemini-3.1-flash-lite'
|
|
13
|
-
| 'gemini-2.5-pro'
|
|
14
|
-
| 'gemini-2.5-flash'
|
|
15
|
-
| 'gemini-2.5-flash-lite'
|
|
16
|
-
| 'gemini-2.0-flash'
|
|
17
|
-
| 'gemini-1.5-flash'
|
|
18
|
-
| 'gemini-1.5-pro'
|
|
19
|
-
| 'gemini-2.5-pro-exp-03-25'
|
|
20
|
-
| 'gemini-2.0-flash-001'
|
|
21
|
-
| 'gemini-2.0-flash-lite'
|
|
22
|
-
| 'gemini-2.0-flash-lite-001'
|
|
23
|
-
| 'gemini-1.5-flash-latest'
|
|
24
|
-
| 'gemini-1.5-flash-001'
|
|
25
|
-
| 'gemini-1.5-flash-002'
|
|
26
|
-
| 'gemini-1.5-pro-latest'
|
|
27
|
-
| 'gemini-1.5-pro-001'
|
|
28
|
-
| 'gemini-1.5-pro-002'
|
|
29
|
-
| 'gpt-5.5'
|
|
30
|
-
| 'gpt-5.4'
|
|
31
|
-
| 'gpt-5.3'
|
|
32
|
-
| 'gpt-5.2'
|
|
33
|
-
| 'gpt-5'
|
|
34
|
-
| 'gpt-5-mini'
|
|
35
|
-
| 'gpt-5-nano'
|
|
36
|
-
| 'gpt-4.1'
|
|
37
|
-
| 'gpt-4.1-mini'
|
|
38
|
-
| 'gpt-4.1-nano'
|
|
39
|
-
| 'gpt-4o'
|
|
40
|
-
| 'gpt-4o-mini'
|
|
41
|
-
| 'gpt-4.5'
|
|
42
|
-
| 'o1'
|
|
43
|
-
| 'o1-mini'
|
|
44
|
-
| 'o3-mini'
|
|
45
|
-
| 'o4-mini'
|
|
46
|
-
| 'o4-mini-high'
|
|
47
|
-
| 'gpt-3.5-turbo'
|
|
48
|
-
| 'gpt-3.5-turbo-16k'
|
|
49
|
-
| 'accounts/fireworks/models/minimax-m2p7'
|
|
50
|
-
| 'accounts/fireworks/models/minimax-m2p5'
|
|
51
|
-
| 'accounts/fireworks/models/deepseek-v3p2'
|
|
52
|
-
| 'accounts/fireworks/models/kimi-k2p5'
|
|
53
|
-
| 'accounts/fireworks/models/glm-5'
|
|
54
|
-
| 'accounts/fireworks/models/glm-5p1'
|
|
55
|
-
| 'accounts/fireworks/models/deepseek-v4-pro'
|
|
56
|
-
| 'accounts/fireworks/models/qwen3p6-plus'
|
|
57
|
-
| 'grok-4.3'
|
|
58
|
-
| 'grok-4-1-fast-reasoning'
|
|
59
|
-
| 'grok-4-1-fast-non-reasoning'
|
|
60
|
-
| 'grok-code-fast-1'
|
|
61
|
-
| 'grok-4-fast-reasoning'
|
|
62
|
-
| 'grok-4-fast-non-reasoning'
|
|
63
|
-
| 'grok-4-0709'
|
|
64
|
-
| 'grok-3-mini'
|
|
65
|
-
| 'grok-3'
|
|
66
|
-
| 'grok-2-vision-1212'
|
|
67
|
-
| 'ollama'
|
|
68
|
-
| 'openai-compatible'
|
|
69
|
-
| 'openrouter';
|
|
70
7
|
|
|
71
8
|
export type SynthesizerName = 'gcloud' | 'elevenlabs' | 'gtts' | 'openai';
|
|
72
9
|
|
|
@@ -100,13 +37,8 @@ export interface Variable {
|
|
|
100
37
|
}
|
|
101
38
|
|
|
102
39
|
export interface ModelConfiguration {
|
|
103
|
-
/**
|
|
104
|
-
|
|
105
|
-
* names (e.g. "gpt-5", "accounts/fireworks/models/x", "ollama") are still
|
|
106
|
-
* accepted; the provider is derived server-side. The `ModelName` union keeps
|
|
107
|
-
* autocomplete for known models while `string` allows any litellm identifier.
|
|
108
|
-
*/
|
|
109
|
-
modelName?: ModelName | (string & {});
|
|
40
|
+
/** litellm-style "<provider>/<model>" string (e.g. "fireworks/accounts/fireworks/models/minimax-m3"). Use the known-models API for the current list. */
|
|
41
|
+
modelName?: string;
|
|
110
42
|
temperature?: number;
|
|
111
43
|
reasoningEffort?: ReasoningEffort;
|
|
112
44
|
/** Maximum number of output tokens to generate. Undefined = provider default. */
|
|
@@ -115,6 +47,8 @@ export interface ModelConfiguration {
|
|
|
115
47
|
apiKey?: string;
|
|
116
48
|
/** Override the per-provider default base URL when set. */
|
|
117
49
|
baseUrl?: string;
|
|
50
|
+
/** Passed verbatim as extra_body to the underlying LLM request (e.g. { service_tier: "priority" }). */
|
|
51
|
+
extraBody?: Record<string, unknown>;
|
|
118
52
|
/** @deprecated use `baseUrl`. Kept for backward compatibility. */
|
|
119
53
|
url?: string;
|
|
120
54
|
/** @deprecated use litellm `modelName` (e.g. "ollama/llama3.1"). */
|
|
@@ -127,6 +61,19 @@ export interface ModelConfiguration {
|
|
|
127
61
|
openrouterModelName?: string;
|
|
128
62
|
}
|
|
129
63
|
|
|
64
|
+
export type AttachmentsPreprocessorImageHandling = 'drop' | 'describe' | 'keep';
|
|
65
|
+
|
|
66
|
+
export interface AttachmentsPreprocessorConfiguration {
|
|
67
|
+
enabled?: boolean;
|
|
68
|
+
imageHandling?: AttachmentsPreprocessorImageHandling;
|
|
69
|
+
standalonePassthrough?: boolean;
|
|
70
|
+
secondaryModel?: ModelConfiguration;
|
|
71
|
+
llmPrompt?: string;
|
|
72
|
+
pdfImageDpi?: number;
|
|
73
|
+
maxPages?: number;
|
|
74
|
+
failOpen?: boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
130
77
|
export interface SynthesizerVoice {
|
|
131
78
|
id?: string;
|
|
132
79
|
name?: string;
|
|
@@ -362,6 +309,7 @@ export interface Agent {
|
|
|
362
309
|
toolkit?: ToolkitConfiguration;
|
|
363
310
|
shortTermMemory?: StmConfiguration;
|
|
364
311
|
contextManagement?: ContextManagementConfiguration;
|
|
312
|
+
attachmentsPreprocessor?: AttachmentsPreprocessorConfiguration;
|
|
365
313
|
responseSchema?: Record<string, unknown>;
|
|
366
314
|
verboseErrors?: boolean;
|
|
367
315
|
}
|
|
@@ -393,6 +341,7 @@ export interface AgentCreateRequest {
|
|
|
393
341
|
toolkit?: ToolkitConfiguration;
|
|
394
342
|
shortTermMemory?: StmConfiguration;
|
|
395
343
|
contextManagement?: ContextManagementConfiguration;
|
|
344
|
+
attachmentsPreprocessor?: AttachmentsPreprocessorConfiguration;
|
|
396
345
|
responseSchema?: Record<string, unknown>;
|
|
397
346
|
verboseErrors?: boolean;
|
|
398
347
|
}
|
package/src/index.ts
CHANGED
|
@@ -26,7 +26,6 @@ export type {
|
|
|
26
26
|
KnowledgeType,
|
|
27
27
|
LanguageCode,
|
|
28
28
|
ModelConfiguration,
|
|
29
|
-
ModelName,
|
|
30
29
|
NetworkConfiguration,
|
|
31
30
|
OrchestrationConfiguration,
|
|
32
31
|
OrchestrationAgent,
|
|
@@ -55,6 +54,9 @@ export type {
|
|
|
55
54
|
ReasoningEffort,
|
|
56
55
|
ModelProvider,
|
|
57
56
|
CollaborationMode,
|
|
57
|
+
ContextManagementConfiguration,
|
|
58
|
+
AttachmentsPreprocessorConfiguration,
|
|
59
|
+
AttachmentsPreprocessorImageHandling,
|
|
58
60
|
} from './agents/types';
|
|
59
61
|
export { SessionsApi } from './sessions/sessions-api';
|
|
60
62
|
export type {
|