@applica-software-guru/persona-sdk 0.1.96 → 0.1.101

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.
Files changed (167) hide show
  1. package/.eslintrc.cjs +6 -5
  2. package/.nvmrc +1 -1
  3. package/.prettierignore +3 -5
  4. package/.prettierrc +3 -5
  5. package/README.md +360 -20
  6. package/bitbucket-pipelines.yml +6 -5
  7. package/dist/bundle.cjs.js +1 -27
  8. package/dist/bundle.cjs.js.map +1 -1
  9. package/dist/bundle.es.js +703 -5053
  10. package/dist/bundle.es.js.map +1 -1
  11. package/dist/index.d.ts +1442 -7
  12. package/package.json +9 -51
  13. package/src/agents/agents-api.ts +66 -0
  14. package/src/agents/types.ts +349 -0
  15. package/src/auth/api-key-auth.ts +13 -0
  16. package/src/auth/authentication-provider.ts +4 -0
  17. package/src/auth/bearer-token-auth.ts +13 -0
  18. package/src/auth/index.ts +3 -0
  19. package/src/billing/billing-client.ts +182 -0
  20. package/src/billing/types.ts +166 -0
  21. package/src/credentials/credentials-api.ts +40 -0
  22. package/src/credentials/types.ts +67 -0
  23. package/src/exceptions.ts +10 -0
  24. package/src/features/feature-templates-api.ts +43 -0
  25. package/src/features/features-api.ts +16 -0
  26. package/src/features/types.ts +25 -0
  27. package/src/http-api.ts +102 -0
  28. package/src/index.ts +179 -6
  29. package/src/knowledges/knowledge-base-documents-api.ts +39 -0
  30. package/src/knowledges/knowledge-bases-api.ts +48 -0
  31. package/src/knowledges/types.ts +70 -0
  32. package/src/known-models/known-models-api.ts +33 -0
  33. package/src/known-models/types.ts +7 -0
  34. package/src/missions/missions-api.ts +62 -0
  35. package/src/missions/types.ts +25 -0
  36. package/src/paginated.ts +6 -0
  37. package/src/persona-sdk.ts +104 -0
  38. package/src/projects/projects-api.ts +90 -0
  39. package/src/projects/types.ts +52 -0
  40. package/src/revisions/types.ts +9 -0
  41. package/src/service-prices/service-prices-api.ts +33 -0
  42. package/src/service-prices/types.ts +8 -0
  43. package/src/sessions/sessions-api.ts +90 -0
  44. package/src/sessions/types.ts +150 -0
  45. package/src/triggers/trigger-executions-api.ts +28 -0
  46. package/src/triggers/triggers-api.ts +38 -0
  47. package/src/triggers/types.ts +50 -0
  48. package/src/values/values-api.ts +84 -0
  49. package/src/workflows/types.ts +150 -0
  50. package/src/workflows/workflow-executions-api.ts +28 -0
  51. package/src/workflows/workflows-api.ts +52 -0
  52. package/tsconfig.json +20 -28
  53. package/vite.config.ts +20 -67
  54. package/.github/copilot-instructions.md +0 -3
  55. package/CLAUDE.md +0 -3
  56. package/GEMINI.md +0 -3
  57. package/components.json +0 -24
  58. package/dist/bundle.iife.js +0 -28
  59. package/dist/bundle.iife.js.map +0 -1
  60. package/dist/bundle.umd.js +0 -28
  61. package/dist/bundle.umd.js.map +0 -1
  62. package/dist/index.d.ts.map +0 -1
  63. package/dist/logging.d.ts +0 -18
  64. package/dist/logging.d.ts.map +0 -1
  65. package/dist/messages.d.ts +0 -9
  66. package/dist/messages.d.ts.map +0 -1
  67. package/dist/protocol/base.d.ts +0 -25
  68. package/dist/protocol/base.d.ts.map +0 -1
  69. package/dist/protocol/index.d.ts +0 -6
  70. package/dist/protocol/index.d.ts.map +0 -1
  71. package/dist/protocol/rest.d.ts +0 -25
  72. package/dist/protocol/rest.d.ts.map +0 -1
  73. package/dist/protocol/transaction.d.ts +0 -56
  74. package/dist/protocol/transaction.d.ts.map +0 -1
  75. package/dist/protocol/webrtc.d.ts +0 -60
  76. package/dist/protocol/webrtc.d.ts.map +0 -1
  77. package/dist/protocol/websocket.d.ts +0 -22
  78. package/dist/protocol/websocket.d.ts.map +0 -1
  79. package/dist/runtime/context.d.ts +0 -34
  80. package/dist/runtime/context.d.ts.map +0 -1
  81. package/dist/runtime/file-attachment-adapter.d.ts +0 -15
  82. package/dist/runtime/file-attachment-adapter.d.ts.map +0 -1
  83. package/dist/runtime/handlers.d.ts +0 -21
  84. package/dist/runtime/handlers.d.ts.map +0 -1
  85. package/dist/runtime/listeners.d.ts +0 -6
  86. package/dist/runtime/listeners.d.ts.map +0 -1
  87. package/dist/runtime/protocols.d.ts +0 -17
  88. package/dist/runtime/protocols.d.ts.map +0 -1
  89. package/dist/runtime/threads.d.ts +0 -34
  90. package/dist/runtime/threads.d.ts.map +0 -1
  91. package/dist/runtime/utils.d.ts +0 -10
  92. package/dist/runtime/utils.d.ts.map +0 -1
  93. package/dist/runtime.d.ts +0 -6
  94. package/dist/runtime.d.ts.map +0 -1
  95. package/dist/storage/base.d.ts +0 -9
  96. package/dist/storage/base.d.ts.map +0 -1
  97. package/dist/storage/index.d.ts +0 -3
  98. package/dist/storage/index.d.ts.map +0 -1
  99. package/dist/storage/persona.d.ts +0 -29
  100. package/dist/storage/persona.d.ts.map +0 -1
  101. package/dist/tools.d.ts +0 -72
  102. package/dist/tools.d.ts.map +0 -1
  103. package/dist/types.d.ts +0 -221
  104. package/dist/types.d.ts.map +0 -1
  105. package/docs/README.md +0 -13
  106. package/docs/api-reference.md +0 -16
  107. package/docs/contributing.md +0 -21
  108. package/docs/customization.md +0 -74
  109. package/docs/features.md +0 -7
  110. package/docs/installation.md +0 -9
  111. package/docs/messages.md +0 -214
  112. package/docs/protocols.md +0 -39
  113. package/docs/transactions.md +0 -121
  114. package/docs/usage.md +0 -40
  115. package/jsconfig.node.json +0 -10
  116. package/playground/index.html +0 -14
  117. package/playground/src/app.tsx +0 -10
  118. package/playground/src/chat.tsx +0 -117
  119. package/playground/src/components/assistant-ui/assistant-modal.tsx +0 -57
  120. package/playground/src/components/assistant-ui/attachment.tsx +0 -197
  121. package/playground/src/components/assistant-ui/markdown-text.tsx +0 -228
  122. package/playground/src/components/assistant-ui/thread-list.tsx +0 -91
  123. package/playground/src/components/assistant-ui/thread.tsx +0 -302
  124. package/playground/src/components/assistant-ui/threadlist-sidebar.tsx +0 -59
  125. package/playground/src/components/assistant-ui/tool-fallback.tsx +0 -93
  126. package/playground/src/components/assistant-ui/tooltip-icon-button.tsx +0 -42
  127. package/playground/src/components/chat/logging.tsx +0 -53
  128. package/playground/src/components/ui/avatar.tsx +0 -51
  129. package/playground/src/components/ui/button.tsx +0 -60
  130. package/playground/src/components/ui/dialog.tsx +0 -141
  131. package/playground/src/components/ui/input.tsx +0 -21
  132. package/playground/src/components/ui/separator.tsx +0 -26
  133. package/playground/src/components/ui/sheet.tsx +0 -139
  134. package/playground/src/components/ui/sidebar.tsx +0 -619
  135. package/playground/src/components/ui/skeleton.tsx +0 -13
  136. package/playground/src/components/ui/tooltip.tsx +0 -59
  137. package/playground/src/hooks/theme.ts +0 -70
  138. package/playground/src/hooks/use-mobile.ts +0 -19
  139. package/playground/src/lib/utils.ts +0 -6
  140. package/playground/src/main.tsx +0 -10
  141. package/playground/src/styles.css +0 -120
  142. package/playground/src/tools.ts +0 -149
  143. package/playground/src/vite-env.d.ts +0 -1
  144. package/preview-build.sh +0 -23
  145. package/src/logging.ts +0 -34
  146. package/src/messages.ts +0 -202
  147. package/src/protocol/base.ts +0 -73
  148. package/src/protocol/index.ts +0 -5
  149. package/src/protocol/rest.ts +0 -107
  150. package/src/protocol/transaction.ts +0 -182
  151. package/src/protocol/webrtc.ts +0 -379
  152. package/src/protocol/websocket.ts +0 -111
  153. package/src/runtime/context.ts +0 -88
  154. package/src/runtime/file-attachment-adapter.ts +0 -48
  155. package/src/runtime/handlers.ts +0 -322
  156. package/src/runtime/index.ts +0 -6
  157. package/src/runtime/listeners.ts +0 -79
  158. package/src/runtime/protocols.ts +0 -169
  159. package/src/runtime/threads.ts +0 -105
  160. package/src/runtime/utils.ts +0 -46
  161. package/src/runtime.tsx +0 -334
  162. package/src/storage/base.ts +0 -13
  163. package/src/storage/index.ts +0 -2
  164. package/src/storage/persona.ts +0 -138
  165. package/src/tools.ts +0 -211
  166. package/src/types.ts +0 -267
  167. package/tsconfig.node.json +0 -15
package/dist/index.d.ts CHANGED
@@ -1,7 +1,1442 @@
1
- export * from './runtime';
2
- export * from './logging';
3
- export * from './protocol';
4
- export * from './types';
5
- export * from './tools';
6
- export * from './storage';
7
- //# sourceMappingURL=index.d.ts.map
1
+ export declare interface AddProjectSubscriptionCreditsRequest {
2
+ credits: number;
3
+ }
4
+
5
+ export declare interface Agent {
6
+ id?: string;
7
+ projectId?: string;
8
+ apiKey?: string;
9
+ code?: string;
10
+ name?: string;
11
+ description?: string;
12
+ type?: AgentType;
13
+ synthesizer?: SynthesizerConfiguration;
14
+ transcriber?: TranscriberConfiguration;
15
+ model?: ModelConfiguration;
16
+ systemInstructions?: string;
17
+ variables?: Variable[];
18
+ enabledProtocols?: AgentProtocol[];
19
+ twilio?: TwilioConfiguration;
20
+ languageCode?: LanguageCode;
21
+ initialMessage?: string;
22
+ initialMessageMode?: "processed" | "static";
23
+ knowledge?: KnowledgeConfiguration;
24
+ wakeup?: WakeupConfiguration;
25
+ telegram?: TelegramConfiguration;
26
+ whatsapp?: WhatsAppConfiguration;
27
+ collaboration?: CollaborationConfiguration;
28
+ orchestration?: OrchestrationConfiguration;
29
+ network?: NetworkConfiguration;
30
+ features?: Feature[];
31
+ toolkit?: ToolkitConfiguration;
32
+ shortTermMemory?: StmConfiguration;
33
+ contextManagement?: ContextManagementConfiguration;
34
+ attachmentsPreprocessor?: AttachmentsPreprocessorConfiguration;
35
+ responseSchema?: Record<string, unknown>;
36
+ verboseErrors?: boolean;
37
+ }
38
+
39
+ export declare interface AgentContext {
40
+ }
41
+
42
+ export declare interface AgentCreateRequest {
43
+ projectId?: string;
44
+ code?: string;
45
+ name?: string;
46
+ description?: string;
47
+ type?: AgentType;
48
+ synthesizer?: SynthesizerConfiguration;
49
+ transcriber?: TranscriberConfiguration;
50
+ model?: ModelConfiguration;
51
+ systemInstructions?: string;
52
+ variables?: Variable[];
53
+ enabledProtocols?: AgentProtocol[];
54
+ twilio?: TwilioConfiguration;
55
+ languageCode?: LanguageCode;
56
+ initialMessage?: string;
57
+ initialMessageMode?: "processed" | "static";
58
+ knowledge?: KnowledgeConfiguration;
59
+ wakeup?: WakeupConfiguration;
60
+ telegram?: TelegramConfiguration;
61
+ whatsapp?: WhatsAppConfiguration;
62
+ collaboration?: CollaborationConfiguration;
63
+ orchestration?: OrchestrationConfiguration;
64
+ network?: NetworkConfiguration;
65
+ features?: Feature[];
66
+ toolkit?: ToolkitConfiguration;
67
+ shortTermMemory?: StmConfiguration;
68
+ contextManagement?: ContextManagementConfiguration;
69
+ attachmentsPreprocessor?: AttachmentsPreprocessorConfiguration;
70
+ responseSchema?: Record<string, unknown>;
71
+ verboseErrors?: boolean;
72
+ }
73
+
74
+ export declare type AgentProtocol = 'webrtc' | 'twilio' | 'rest' | 'websocket' | 'telegram';
75
+
76
+ export declare interface AgentResponse {
77
+ messages?: Message[];
78
+ transfer?: TransferAction;
79
+ }
80
+
81
+ export declare class AgentsApi extends HttpApi {
82
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
83
+ list(keyword?: string | null, page?: number, size?: number, extraParams?: Record<string, string>): Promise<Paginated<Agent>>;
84
+ get(agentId: string): Promise<Agent>;
85
+ create(request: AgentCreateRequest): Promise<Agent>;
86
+ update(request: AgentUpdateRequest): Promise<Agent>;
87
+ remove(agentId: string): Promise<void>;
88
+ getSynthesizerSupportedVoices(synthesizerName: string): Promise<SynthesizerVoice[]>;
89
+ listRevisions(agentId: string): Promise<Revision[]>;
90
+ getRevision(agentId: string, revisionId: string): Promise<Revision>;
91
+ rollback(agentId: string, revisionId: string): Promise<Agent>;
92
+ generateSystemInstructions(prompt: string, sessionId?: string): Promise<string>;
93
+ getArchitect(): Promise<Agent>;
94
+ }
95
+
96
+ declare interface AgentStateInfo {
97
+ state: string;
98
+ sessionId?: string;
99
+ agentId?: string;
100
+ currentTurn?: number;
101
+ pendingSteers?: number;
102
+ eventCount?: number;
103
+ message?: string;
104
+ }
105
+
106
+ export declare type AgentType = 'agent';
107
+
108
+ export declare interface AgentUpdateRequest extends Agent {
109
+ }
110
+
111
+ export declare interface AgentValue {
112
+ agentId?: string;
113
+ initialContext?: Record<string, unknown>;
114
+ }
115
+
116
+ export declare class ApiException extends Error {
117
+ readonly statusCode: number;
118
+ readonly body: string;
119
+ constructor(statusCode: number, body: string);
120
+ }
121
+
122
+ export declare class ApiKeyAuthenticationProvider implements AuthenticationProvider {
123
+ private readonly apiKey;
124
+ constructor(apiKey: string);
125
+ applyHeaders(headers: Headers): void;
126
+ getCredentials(): string;
127
+ }
128
+
129
+ export declare interface AttachmentsPreprocessorConfiguration {
130
+ enabled?: boolean;
131
+ imageHandling?: AttachmentsPreprocessorImageHandling;
132
+ standalonePassthrough?: boolean;
133
+ secondaryModel?: ModelConfiguration;
134
+ llmPrompt?: string;
135
+ pdfImageDpi?: number;
136
+ maxPages?: number;
137
+ failOpen?: boolean;
138
+ }
139
+
140
+ export declare type AttachmentsPreprocessorImageHandling = 'drop' | 'describe' | 'keep';
141
+
142
+ export declare interface AuthenticationProvider {
143
+ applyHeaders(headers: Headers): void;
144
+ getCredentials(): string;
145
+ }
146
+
147
+ export declare interface AuthorizeRequest {
148
+ name?: string;
149
+ provider?: string;
150
+ clientId?: string;
151
+ clientSecret?: string;
152
+ scope?: string;
153
+ apiKey?: string;
154
+ apiSecret?: string;
155
+ token?: string;
156
+ successUrl?: string;
157
+ server?: string;
158
+ port?: number;
159
+ useSsl?: boolean;
160
+ username?: string;
161
+ password?: string;
162
+ }
163
+
164
+ export declare interface AuthorizeResponse {
165
+ credentials?: Credentials;
166
+ state?: OAuth2State;
167
+ redirectUrl?: string;
168
+ }
169
+
170
+ export declare class BearerTokenAuthenticationProvider implements AuthenticationProvider {
171
+ private readonly token;
172
+ constructor(token: string);
173
+ applyHeaders(headers: Headers): void;
174
+ getCredentials(): string;
175
+ }
176
+
177
+ export declare class BillingClient {
178
+ private readonly baseUrl;
179
+ private readonly authProvider;
180
+ constructor(baseUrl?: string, auth?: string | AuthenticationProvider | null);
181
+ private buildHeaders;
182
+ private request;
183
+ createCustomer(request: CreateCustomerRequest): Promise<Customer>;
184
+ updateCustomer(owner: string, request: UpdateCustomerRequest): Promise<Customer>;
185
+ getCustomer(owner: string): Promise<Customer>;
186
+ saveCustomer(customer: Customer): Promise<Customer>;
187
+ deleteCustomer(owner: string): Promise<void>;
188
+ createSubscription(request: CreateSubscriptionRequest): Promise<Subscription>;
189
+ getSubscription(owner: string): Promise<Subscription>;
190
+ getProjectSubscription(projectId: string): Promise<Subscription>;
191
+ changeProjectSubscriptionPlan(projectId: string, request: {
192
+ toPlanType: string;
193
+ }): Promise<Subscription>;
194
+ addProjectSubscriptionCredits(projectId: string, request: {
195
+ credits: number;
196
+ }): Promise<Subscription>;
197
+ beginUpgrade(owner: string, request: UpgradeSubscriptionRequest): Promise<Subscription>;
198
+ downgrade(owner: string, request: DowngradeSubscriptionRequest): Promise<Subscription>;
199
+ mentorize(owner: string, request: MentorizeSubscriptionRequest): Promise<Subscription>;
200
+ addCredits(owner: string, credits: number): Promise<Subscription>;
201
+ useCredits(owner: string, credits: number, services: string[], referenceId?: string, totalCost?: number, totalPrice?: number): Promise<Subscription>;
202
+ getCredits(owner: string): Promise<number>;
203
+ isValid(owner: string): Promise<boolean>;
204
+ listInvoices(owner: string, dateFrom?: string, dateTo?: string): Promise<Invoice[]>;
205
+ cancelSubscription(owner: string): Promise<Subscription>;
206
+ getUsageStats(projectId: string, dateFrom?: string, dateTo?: string, models?: string[]): Promise<UsageStats>;
207
+ listUsages(projectId: string, dateFrom?: string, dateTo?: string, models?: string[], sessionId?: string, page?: number, size?: number): Promise<UsagePage>;
208
+ }
209
+
210
+ export declare interface BillingUsage {
211
+ id?: string;
212
+ subscriptionId?: string;
213
+ creditsUsed?: number;
214
+ services?: string[];
215
+ totalCost?: number;
216
+ totalPrice?: number;
217
+ referenceId?: string;
218
+ sessionId?: string;
219
+ userId?: string;
220
+ details?: UsageDetail[];
221
+ createdAt?: string;
222
+ }
223
+
224
+ export declare interface ChangeProjectSubscriptionPlanRequest {
225
+ toPlanType: string;
226
+ }
227
+
228
+ export declare interface ChunkResult {
229
+ id?: string;
230
+ text?: string;
231
+ score?: number;
232
+ metadata?: Record<string, unknown>;
233
+ documentId?: string;
234
+ }
235
+
236
+ export declare interface CollaborationConfiguration {
237
+ enabled?: boolean;
238
+ collaborators?: Collaborator[];
239
+ mode?: CollaborationMode;
240
+ maxNumberOfIterations?: number;
241
+ }
242
+
243
+ export declare type CollaborationMode = 'delegate_and_return' | 'persistent_transfer' | 'consult_then_respond';
244
+
245
+ export declare interface Collaborator {
246
+ name?: string;
247
+ agent?: string;
248
+ scope?: string;
249
+ }
250
+
251
+ export declare interface CommittedUsage {
252
+ id?: string;
253
+ committedAt?: string;
254
+ projectId?: string;
255
+ sessionId?: string;
256
+ creditsUsed?: number;
257
+ totalCost?: number;
258
+ totalPrice?: number;
259
+ userId?: string;
260
+ details?: UsageCost[];
261
+ }
262
+
263
+ export declare interface Connection {
264
+ id?: string;
265
+ sourceId?: string;
266
+ targetId?: string;
267
+ sourceHandle?: string;
268
+ targetHandle?: string;
269
+ }
270
+
271
+ export declare interface ContentItem {
272
+ text?: string | Ref;
273
+ file?: ContentItemFile | Ref;
274
+ }
275
+
276
+ export declare interface ContentItemFile {
277
+ content?: string;
278
+ contentType?: string;
279
+ }
280
+
281
+ export declare interface ContentValue {
282
+ content?: ContentItem[];
283
+ }
284
+
285
+ export declare interface ContextManagementConfiguration {
286
+ enabled?: boolean;
287
+ maxContextTokens?: number;
288
+ summarizationThreshold?: number;
289
+ keepLastNIterations?: number;
290
+ keepFirstMessage?: boolean;
291
+ maxToolCallsBeforeCompaction?: number;
292
+ useLlmCompaction?: boolean;
293
+ maxSummaryWords?: number;
294
+ truncationEnabled?: boolean;
295
+ maxObservationTokens?: number;
296
+ compactionModel?: ModelConfiguration;
297
+ }
298
+
299
+ export declare interface CreateCustomerRequest {
300
+ owner?: string;
301
+ name?: string;
302
+ email?: string;
303
+ phone?: string;
304
+ }
305
+
306
+ export declare interface CreateSubscriptionRequest {
307
+ owner: string;
308
+ }
309
+
310
+ export declare interface Credentials {
311
+ id?: string;
312
+ name?: string;
313
+ projectId?: string;
314
+ provider?: string;
315
+ obtainedAt?: string;
316
+ validUntil?: string;
317
+ data?: unknown;
318
+ clientId?: string;
319
+ clientSecret?: string;
320
+ apiKey?: string;
321
+ apiSecret?: string;
322
+ token?: string;
323
+ successUrl?: string;
324
+ active?: boolean;
325
+ server?: string;
326
+ port?: number;
327
+ useSsl?: boolean;
328
+ username?: string;
329
+ password?: string;
330
+ }
331
+
332
+ export declare class CredentialsApi extends HttpApi {
333
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
334
+ authorize(provider: string, request: AuthorizeRequest): Promise<AuthorizeResponse>;
335
+ handleOAuth2Callback(provider: string, code: string, state: string, scope?: string): Promise<OAuth2CallbackResponse>;
336
+ list(): Promise<Credentials[]>;
337
+ getByProvider(provider: string): Promise<Credentials[]>;
338
+ getById(credentialsId: string): Promise<Credentials>;
339
+ remove(credentialsId: string): Promise<void>;
340
+ }
341
+
342
+ export declare interface Customer {
343
+ id?: string;
344
+ owner?: string;
345
+ name?: string;
346
+ email?: string;
347
+ phone?: string;
348
+ address?: string;
349
+ stripeCustomerId?: string;
350
+ }
351
+
352
+ export declare type DocumentExtractorName = 'fitz' | 'document-ai' | 'gemini' | 'markdown';
353
+
354
+ export declare interface DowngradeSubscriptionRequest {
355
+ toPlanType: string;
356
+ }
357
+
358
+ export declare type EmbeddingModelName = 'text-multilingual-embedding-002' | 'gemini-embedding-001';
359
+
360
+ export declare interface ExecuteRequest {
361
+ userId?: string;
362
+ initialData?: Record<string, unknown>;
363
+ callbackUrl?: string;
364
+ }
365
+
366
+ export declare interface Execution {
367
+ id?: string;
368
+ workflowId?: string;
369
+ status?: string;
370
+ userId?: string;
371
+ steps?: Step[];
372
+ startedAt?: string;
373
+ endedAt?: string;
374
+ output?: Record<string, unknown>;
375
+ error?: string;
376
+ }
377
+
378
+ export declare type ExecutionStatus = 'running' | 'completed' | 'failed' | 'cancelled';
379
+
380
+ export declare interface Feature {
381
+ id?: string;
382
+ templateId?: string;
383
+ credentialsId?: string;
384
+ }
385
+
386
+ export declare type FeatureConfiguration = McpServerConfiguration | FlagConfiguration | SkillConfiguration;
387
+
388
+ export declare interface FeatureCredentialsConfiguration {
389
+ requireCredentials?: boolean;
390
+ credentialsType?: string;
391
+ }
392
+
393
+ export declare class FeaturesApi {
394
+ private readonly baseUrl;
395
+ private readonly auth;
396
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
397
+ templates(): FeatureTemplatesApi;
398
+ }
399
+
400
+ export declare interface FeatureTemplate {
401
+ id?: string;
402
+ projectId?: string;
403
+ type?: FeatureType;
404
+ name?: string;
405
+ description?: string;
406
+ logoUrl?: string;
407
+ configuration?: FeatureConfiguration;
408
+ credentialsConfiguration?: FeatureCredentialsConfiguration;
409
+ }
410
+
411
+ export declare class FeatureTemplatesApi extends HttpApi {
412
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
413
+ list(keyword?: string | null, page?: number, size?: number, extraParams?: Record<string, string>): Promise<Paginated<FeatureTemplate>>;
414
+ get(templateId: string): Promise<FeatureTemplate>;
415
+ create(template: FeatureTemplate): Promise<FeatureTemplate>;
416
+ update(templateId: string, template: FeatureTemplate): Promise<FeatureTemplate>;
417
+ patch(templateId: string, template: FeatureTemplate): Promise<FeatureTemplate>;
418
+ remove(templateId: string): Promise<void>;
419
+ getMcpAvailableTools(configuration: McpServerConfiguration, credentialsId?: string): Promise<McpToolsResponse>;
420
+ }
421
+
422
+ export declare type FeatureType = 'mcp' | 'flag' | 'skill';
423
+
424
+ export declare interface FlagConfiguration {
425
+ type?: string;
426
+ flag?: string;
427
+ }
428
+
429
+ export declare interface FunctionCall {
430
+ name?: string;
431
+ args?: Record<string, unknown>;
432
+ id?: string;
433
+ }
434
+
435
+ export declare interface FunctionResponse {
436
+ name?: string;
437
+ result?: ToolResultItem | ToolResultItem[] | null;
438
+ functionCallId?: string;
439
+ }
440
+
441
+ export declare interface GenerationRequest {
442
+ agentId?: string;
443
+ userMessage?: unknown;
444
+ initialContext?: AgentContext;
445
+ responseSchema?: Record<string, unknown>;
446
+ parentSessionId?: string;
447
+ userId?: string;
448
+ }
449
+
450
+ export declare interface GenerationResponse {
451
+ json?: unknown;
452
+ response?: AgentResponse;
453
+ sessionId?: string;
454
+ }
455
+
456
+ export declare interface GmailTriggerSourceConfiguration {
457
+ event?: string;
458
+ query?: string;
459
+ credentialsId?: string;
460
+ userEmail?: string;
461
+ watchExpiration?: number;
462
+ lastHistoryId?: number;
463
+ }
464
+
465
+ export declare interface Handle {
466
+ name?: string;
467
+ description?: string;
468
+ type?: string;
469
+ }
470
+
471
+ declare abstract class HttpApi {
472
+ private readonly baseUrl;
473
+ private readonly authProvider;
474
+ constructor(baseUrl: string, apiKey: string | AuthenticationProvider);
475
+ protected getBaseUrl(): string;
476
+ protected getAuthProvider(): AuthenticationProvider;
477
+ protected normalizePageParams(page?: number, size?: number): {
478
+ page: number;
479
+ size: number;
480
+ };
481
+ private buildHeaders;
482
+ private buildUrl;
483
+ private handleResponse;
484
+ protected httpGet<T>(path: string, params?: Record<string, unknown>): Promise<T>;
485
+ protected httpPost<T>(path: string, body?: unknown, params?: Record<string, unknown>): Promise<T>;
486
+ protected httpPut<T>(path: string, body: unknown): Promise<T>;
487
+ protected httpPatch<T>(path: string, body: unknown): Promise<T>;
488
+ protected httpDelete(path: string): Promise<void>;
489
+ }
490
+
491
+ export declare interface HttpTransport {
492
+ url?: string;
493
+ enablePersonaAuth?: boolean;
494
+ headers?: Record<string, string>;
495
+ }
496
+
497
+ declare interface Image_2 {
498
+ content?: string;
499
+ contentType?: string;
500
+ }
501
+ export { Image_2 as Image }
502
+
503
+ export declare interface ImapTriggerSourceConfiguration {
504
+ event?: string;
505
+ credentialsId?: string;
506
+ mailbox?: string;
507
+ searchCriteria?: string;
508
+ processAttachments?: boolean;
509
+ allowedMimeTypes?: string[];
510
+ }
511
+
512
+ export declare interface Invoice {
513
+ id?: string;
514
+ subscriptionId?: string;
515
+ status?: string;
516
+ amountDue?: number;
517
+ amountPaid?: number;
518
+ currency?: string;
519
+ customerEmail?: string;
520
+ customerName?: string;
521
+ hostedInvoiceUrl?: string;
522
+ invoicePdf?: string;
523
+ dueDate?: string;
524
+ createdAt?: string;
525
+ updatedAt?: string;
526
+ lines?: LineItem[];
527
+ }
528
+
529
+ export declare interface KnowledgeBase {
530
+ id?: string;
531
+ projectId?: string;
532
+ name?: string;
533
+ description?: string;
534
+ quality?: KnowledgeBaseQuality;
535
+ chunkSize?: KnowledgeBaseChunkSize;
536
+ embeddingModel?: EmbeddingModelName;
537
+ }
538
+
539
+ export declare type KnowledgeBaseChunkSize = 'small' | 'medium' | 'large';
540
+
541
+ export declare interface KnowledgeBaseCreateRequest {
542
+ name?: string;
543
+ description?: string;
544
+ quality?: KnowledgeBaseQuality;
545
+ chunkSize?: KnowledgeBaseChunkSize;
546
+ embeddingModel?: EmbeddingModelName;
547
+ }
548
+
549
+ export declare interface KnowledgeBaseDocument {
550
+ id?: string;
551
+ knowledgeBaseId?: string;
552
+ path?: string;
553
+ name?: string;
554
+ size?: number;
555
+ contentType?: string;
556
+ status?: KnowledgeBaseDocumentStatus;
557
+ progress?: number;
558
+ extractor?: DocumentExtractorName;
559
+ error?: string;
560
+ metadata?: Record<string, unknown>;
561
+ totalPages?: number;
562
+ callbackUrl?: string;
563
+ }
564
+
565
+ export declare class KnowledgeBaseDocumentsApi extends HttpApi {
566
+ private readonly knowledgeBaseId;
567
+ constructor(baseUrl: string, auth: string | AuthenticationProvider, knowledgeBaseId: string);
568
+ list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<KnowledgeBaseDocument>>;
569
+ upload(request: KnowledgeBaseDocumentUploadRequest): Promise<KnowledgeBaseDocument>;
570
+ get(documentId: string): Promise<KnowledgeBaseDocument>;
571
+ reprocess(documentId: string): Promise<KnowledgeBaseDocument>;
572
+ remove(documentId: string): Promise<void>;
573
+ }
574
+
575
+ export declare type KnowledgeBaseDocumentStatus = 'pending' | 'processing' | 'completed' | 'failed';
576
+
577
+ export declare interface KnowledgeBaseDocumentUploadRequest {
578
+ uri?: string;
579
+ base64?: string;
580
+ name?: string;
581
+ extractor?: DocumentExtractorName;
582
+ callbackUrl?: string;
583
+ }
584
+
585
+ export declare type KnowledgeBaseQuality = 'extremely_high' | 'very_high' | 'high' | 'medium' | 'low';
586
+
587
+ export declare class KnowledgeBasesApi extends HttpApi {
588
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
589
+ list(keyword?: string | null, page?: number, size?: number, extraParams?: Record<string, string>): Promise<Paginated<KnowledgeBase>>;
590
+ get(id: string): Promise<KnowledgeBase>;
591
+ create(request: KnowledgeBaseCreateRequest): Promise<KnowledgeBase>;
592
+ update(request: KnowledgeBaseUpdateRequest): Promise<KnowledgeBase>;
593
+ remove(id: string): Promise<void>;
594
+ documents(knowledgeBaseId: string): KnowledgeBaseDocumentsApi;
595
+ searchChunks(id: string, request: SearchChunksRequest): Promise<ChunkResult[]>;
596
+ }
597
+
598
+ export declare interface KnowledgeBaseUpdateRequest {
599
+ id?: string;
600
+ name?: string;
601
+ description?: string;
602
+ }
603
+
604
+ export declare interface KnowledgeConfiguration {
605
+ enabled?: boolean;
606
+ knowledgeType?: KnowledgeType;
607
+ namespace?: string[];
608
+ numberOfEntries?: number;
609
+ args?: Record<string, unknown>;
610
+ knowledgeBaseId?: string;
611
+ }
612
+
613
+ export declare type KnowledgeType = 'multi_hop' | 'simple';
614
+
615
+ export declare interface KnownModel {
616
+ id?: string;
617
+ provider?: string;
618
+ modelName?: string;
619
+ label?: string;
620
+ deprecated?: boolean;
621
+ }
622
+
623
+ export declare class KnownModelsApi extends HttpApi {
624
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
625
+ list(keyword?: string | null, page?: number, size?: number, extraParams?: Record<string, string>): Promise<Paginated<KnownModel>>;
626
+ get(id: string): Promise<KnownModel>;
627
+ create(knownModel: KnownModel): Promise<KnownModel>;
628
+ update(id: string, knownModel: KnownModel): Promise<KnownModel>;
629
+ remove(id: string): Promise<void>;
630
+ }
631
+
632
+ export declare type LanguageCode = 'en-US' | 'it-IT' | 'es-ES' | 'fr-FR' | 'de-DE' | 'pt-BR';
633
+
634
+ export declare interface LineItem {
635
+ description?: string;
636
+ amount?: number;
637
+ currency?: string;
638
+ quantity?: number;
639
+ periodStart?: string;
640
+ periodEnd?: string;
641
+ }
642
+
643
+ export declare interface McpServerConfiguration {
644
+ type?: string;
645
+ name?: string;
646
+ transport?: Transport;
647
+ enabledTools?: string[];
648
+ disabledTools?: string[];
649
+ }
650
+
651
+ export declare interface McpToolsResponse {
652
+ tools?: ToolDefinition[];
653
+ error?: string;
654
+ }
655
+
656
+ export declare interface MentorizeSubscriptionRequest {
657
+ endDate?: string;
658
+ }
659
+
660
+ export declare interface Message {
661
+ id?: string;
662
+ sessionId?: string;
663
+ text?: string;
664
+ image?: Image_2;
665
+ file?: SessionFile;
666
+ role?: string;
667
+ timestamp?: number;
668
+ createdAt?: string;
669
+ functionCalls?: FunctionCall[];
670
+ functionResponse?: FunctionResponse;
671
+ finishReason?: string;
672
+ sources?: Source[];
673
+ task?: Record<string, unknown>;
674
+ sender?: string;
675
+ thought?: boolean;
676
+ }
677
+
678
+ export declare interface Mission {
679
+ id?: string;
680
+ projectId?: string;
681
+ name?: string;
682
+ goal?: string;
683
+ status?: MissionStatus;
684
+ plannerAgentId?: string;
685
+ workerAgents?: Record<string, unknown>[];
686
+ steps?: Record<string, unknown>[];
687
+ currentStepId?: string;
688
+ version?: number;
689
+ userInstructions?: string[];
690
+ createdAt?: string;
691
+ updatedAt?: string;
692
+ }
693
+
694
+ export declare class MissionsApi extends HttpApi {
695
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
696
+ list(keyword?: string | null, page?: number, size?: number, status?: string | null): Promise<Paginated<Mission>>;
697
+ get(missionId: string): Promise<Mission>;
698
+ create(mission: Mission): Promise<Mission>;
699
+ update(missionId: string, mission: Mission): Promise<Mission>;
700
+ remove(missionId: string): Promise<void>;
701
+ generate(missionId: string): Promise<Mission>;
702
+ execute(missionId: string): Promise<Mission>;
703
+ retry(missionId: string): Promise<Mission>;
704
+ replan(missionId: string): Promise<Mission>;
705
+ sendInstruction(missionId: string, instruction: string): Promise<Mission>;
706
+ stop(missionId: string): Promise<Mission>;
707
+ resume(missionId: string): Promise<Mission>;
708
+ }
709
+
710
+ export declare type MissionStatus = 'draft' | 'planned' | 'active' | 'review' | 'paused' | 'completed' | 'failed' | 'cancelled';
711
+
712
+ export declare interface ModelConfiguration {
713
+ /** litellm-style "<provider>/<model>" string (e.g. "fireworks/accounts/fireworks/models/minimax-m3"). Use the known-models API for the current list. */
714
+ modelName?: string;
715
+ temperature?: number;
716
+ reasoningEffort?: ReasoningEffort;
717
+ /** Maximum number of output tokens to generate. Undefined = provider default. */
718
+ maxOutputTokens?: number;
719
+ /** Override the per-provider default API key (env var) when set. */
720
+ apiKey?: string;
721
+ /** Override the per-provider default base URL when set. */
722
+ baseUrl?: string;
723
+ /** Passed verbatim as extra_body to the underlying LLM request (e.g. { service_tier: "priority" }). */
724
+ extraBody?: Record<string, unknown>;
725
+ /** @deprecated use `baseUrl`. Kept for backward compatibility. */
726
+ url?: string;
727
+ /** @deprecated use litellm `modelName` (e.g. "ollama/llama3.1"). */
728
+ ollamaModelName?: string;
729
+ /** @deprecated use litellm `modelName` (e.g. "openai_compatible/gpt-4o"). */
730
+ openaiCompatibleModelName?: string;
731
+ /** @deprecated use `apiKey`. */
732
+ openaiCompatibleApiKey?: string;
733
+ /** @deprecated use litellm `modelName` (e.g. "openrouter/anthropic/claude-3"). */
734
+ openrouterModelName?: string;
735
+ }
736
+
737
+ export declare type ModelProvider = 'google' | 'openai' | 'grok' | 'fireworks' | 'together' | 'ollama' | 'openai_compatible' | 'openrouter';
738
+
739
+ export declare interface NetworkConfiguration {
740
+ allowedWebsites?: string[];
741
+ allowedIps?: string[];
742
+ }
743
+
744
+ declare interface Node_2 {
745
+ id?: string;
746
+ type?: NodeType;
747
+ name?: string;
748
+ description?: string;
749
+ position?: Position;
750
+ allowDynamicInputVariables?: boolean;
751
+ allowDynamicOutputVariables?: boolean;
752
+ allowDynamicHandles?: boolean;
753
+ staticVariables?: WorkflowVariable[];
754
+ variables?: WorkflowVariable[];
755
+ values?: Record<string, unknown>;
756
+ staticHandles?: Handle[];
757
+ handles?: Handle[];
758
+ }
759
+ export { Node_2 as Node }
760
+
761
+ export declare interface NodeExecutionResult {
762
+ nextNodes?: Node_2[];
763
+ output?: Record<string, unknown>;
764
+ }
765
+
766
+ export declare type NodeType = 'start' | 'action' | 'condition' | 'loop' | 'tool' | 'agent' | 'set_var' | 'output' | 'workflow' | 'resource' | 'script';
767
+
768
+ export declare interface OAuth2CallbackResponse {
769
+ id?: string;
770
+ successUrl?: string;
771
+ success?: boolean;
772
+ error?: string;
773
+ }
774
+
775
+ export declare interface OAuth2State {
776
+ id?: string;
777
+ credentialsName?: string;
778
+ projectId?: string;
779
+ provider?: string;
780
+ status?: string;
781
+ code?: string;
782
+ scope?: string;
783
+ clientId?: string;
784
+ clientSecret?: string;
785
+ apiKey?: string;
786
+ apiSecret?: string;
787
+ token?: string;
788
+ successUrl?: string;
789
+ }
790
+
791
+ export declare interface OrchestrationAgent {
792
+ name?: string;
793
+ agent?: string;
794
+ scope?: string;
795
+ }
796
+
797
+ export declare interface OrchestrationConfiguration {
798
+ enabled?: boolean;
799
+ agents?: OrchestrationAgent[];
800
+ maxParallelCalls?: number;
801
+ }
802
+
803
+ export declare interface Paginated<T> {
804
+ items: T[];
805
+ total: number;
806
+ page: number;
807
+ size: number;
808
+ }
809
+
810
+ export declare interface Payment {
811
+ id?: string;
812
+ subscriptionId?: string;
813
+ status?: string;
814
+ product?: string;
815
+ quantity?: number;
816
+ createdAt?: string;
817
+ updatedAt?: string;
818
+ checkoutUrl?: string;
819
+ stripeCheckoutSessionId?: string;
820
+ stripeCustomerId?: string;
821
+ stripeSubscriptionId?: string;
822
+ }
823
+
824
+ export declare class PersonaSdk {
825
+ private readonly baseUrl;
826
+ private readonly workflowsBaseUrl;
827
+ private readonly billingBaseUrl;
828
+ constructor(baseUrl: string, workflowsBaseUrl: string, billingBaseUrl?: string);
829
+ projects(apiKey: string): ProjectsApi;
830
+ projects(authProvider: AuthenticationProvider): ProjectsApi;
831
+ agents(apiKey: string): AgentsApi;
832
+ agents(authProvider: AuthenticationProvider): AgentsApi;
833
+ knowledgeBases(apiKey: string): KnowledgeBasesApi;
834
+ knowledgeBases(authProvider: AuthenticationProvider): KnowledgeBasesApi;
835
+ workflows(apiKey: string): WorkflowsApi;
836
+ workflows(authProvider: AuthenticationProvider): WorkflowsApi;
837
+ credentials(apiKey: string): CredentialsApi;
838
+ credentials(authProvider: AuthenticationProvider): CredentialsApi;
839
+ features(apiKey: string): FeaturesApi;
840
+ features(authProvider: AuthenticationProvider): FeaturesApi;
841
+ triggers(apiKey: string): TriggersApi;
842
+ triggers(authProvider: AuthenticationProvider): TriggersApi;
843
+ servicePrices(apiKey: string): ServicePricesApi;
844
+ servicePrices(authProvider: AuthenticationProvider): ServicePricesApi;
845
+ knownModels(apiKey: string): KnownModelsApi;
846
+ knownModels(authProvider: AuthenticationProvider): KnownModelsApi;
847
+ sessions(apiKey: string): SessionsApi;
848
+ sessions(authProvider: AuthenticationProvider): SessionsApi;
849
+ missions(apiKey: string): MissionsApi;
850
+ missions(authProvider: AuthenticationProvider): MissionsApi;
851
+ billing(apiKey: string): BillingClient;
852
+ billing(authProvider: AuthenticationProvider): BillingClient;
853
+ values(apiKey: string): ValuesApi;
854
+ values(authProvider: AuthenticationProvider): ValuesApi;
855
+ }
856
+
857
+ export declare interface Position {
858
+ x?: number;
859
+ y?: number;
860
+ }
861
+
862
+ export declare interface Project {
863
+ id?: string;
864
+ name?: string;
865
+ tag?: string;
866
+ apiKey?: string;
867
+ }
868
+
869
+ export declare interface ProjectCreateRequest {
870
+ name: string;
871
+ tag?: string;
872
+ }
873
+
874
+ export declare interface ProjectDuplicateRequest {
875
+ name: string;
876
+ tag?: string;
877
+ }
878
+
879
+ export declare class ProjectsApi extends HttpApi {
880
+ private readonly billingBaseUrl;
881
+ constructor(baseUrl: string, auth: string | AuthenticationProvider, billingBaseUrl?: string);
882
+ list(keyword: string | null, page: number, size: number): Promise<Paginated<Project>>;
883
+ get(projectId: string): Promise<Project>;
884
+ getMine(): Promise<Project>;
885
+ create(request: ProjectCreateRequest): Promise<Project>;
886
+ update(request: ProjectUpdateRequest): Promise<Project>;
887
+ remove(projectId: string): Promise<void>;
888
+ duplicate(projectId: string, request: ProjectDuplicateRequest): Promise<Project>;
889
+ getSubscription(projectId: string): Promise<ProjectSubscription>;
890
+ changeSubscriptionPlan(projectId: string, request: ChangeProjectSubscriptionPlanRequest): Promise<ProjectSubscription>;
891
+ addSubscriptionCredits(projectId: string, request: AddProjectSubscriptionCreditsRequest): Promise<ProjectSubscription>;
892
+ setInfiniteCredits(projectId: string, request: SetProjectSubscriptionInfiniteCreditsRequest): Promise<ProjectSubscription>;
893
+ private billingRequest;
894
+ }
895
+
896
+ export declare interface ProjectSubscription {
897
+ id?: string;
898
+ projectId?: string;
899
+ owner?: string;
900
+ planType?: string;
901
+ status?: string;
902
+ startDate?: string;
903
+ planCredits?: number;
904
+ extraCredits?: number;
905
+ keepCreditsOnRenew?: boolean;
906
+ infiniteCredits?: boolean;
907
+ endDate?: string;
908
+ createdAt?: string;
909
+ updatedAt?: string;
910
+ stripeCustomerId?: string;
911
+ stripeSubscriptionId?: string;
912
+ }
913
+
914
+ export declare interface ProjectUpdateRequest {
915
+ projectId: string;
916
+ name?: string;
917
+ tag?: string;
918
+ }
919
+
920
+ export declare type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high';
921
+
922
+ export declare interface Ref {
923
+ nodeId?: string;
924
+ variableName?: string;
925
+ }
926
+
927
+ export declare interface Revision {
928
+ id?: string;
929
+ entityId?: string;
930
+ projectId?: string;
931
+ revisionNumber?: number;
932
+ createdAt?: string;
933
+ snapshot?: Record<string, unknown>;
934
+ }
935
+
936
+ export declare interface RevisionType {
937
+ id?: string;
938
+ entityId?: string;
939
+ entityType?: string;
940
+ timestamp?: string;
941
+ data?: Record<string, unknown>;
942
+ userId?: string;
943
+ comment?: string;
944
+ }
945
+
946
+ export declare interface RunResult {
947
+ source?: Node_2;
948
+ success?: boolean;
949
+ message?: string;
950
+ nextNodes?: string[];
951
+ }
952
+
953
+ export declare interface SearchChunksRequest {
954
+ query?: string;
955
+ limit?: number;
956
+ }
957
+
958
+ export declare interface ServicePrice {
959
+ id?: string;
960
+ service?: string;
961
+ cost?: number;
962
+ unit?: string;
963
+ markupPercentage?: number;
964
+ fixedPrice?: number;
965
+ }
966
+
967
+ export declare class ServicePricesApi extends HttpApi {
968
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
969
+ list(keyword?: string | null, page?: number, size?: number, extraParams?: Record<string, string>): Promise<Paginated<ServicePrice>>;
970
+ get(id: string): Promise<ServicePrice>;
971
+ create(servicePrice: ServicePrice): Promise<ServicePrice>;
972
+ update(id: string, servicePrice: ServicePrice): Promise<ServicePrice>;
973
+ remove(id: string): Promise<void>;
974
+ }
975
+
976
+ export declare interface Session {
977
+ id?: string;
978
+ code?: string;
979
+ name?: string;
980
+ projectId?: string;
981
+ agentId?: string;
982
+ currentAgentId?: string;
983
+ userId?: string;
984
+ status?: string;
985
+ visibility?: string;
986
+ type?: string;
987
+ createdAt?: string;
988
+ finishedAt?: string;
989
+ parentSessionId?: string;
990
+ protocol?: string;
991
+ extras?: Record<string, unknown>;
992
+ isNew?: boolean;
993
+ }
994
+
995
+ export declare type SessionCollaborationMode = 'delegate_and_return' | 'persistent_transfer' | 'consult_then_respond';
996
+
997
+ export declare interface SessionFile {
998
+ name?: string;
999
+ url?: string;
1000
+ base64?: string;
1001
+ contentType?: string;
1002
+ }
1003
+
1004
+ export declare class SessionsApi extends HttpApi {
1005
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
1006
+ list(keyword?: string | null, status?: string | null, agentId?: string | null, userId?: string | null, page?: number, size?: number): Promise<Paginated<Session>>;
1007
+ get(sessionId: string): Promise<Session>;
1008
+ getUsage(sessionId: string): Promise<CommittedUsage[]>;
1009
+ generateMessage(code: string, request: GenerationRequest): Promise<GenerationResponse>;
1010
+ findMessages(code: string, page?: number, size?: number): Promise<Paginated<Message>>;
1011
+ remove(code: string): Promise<void>;
1012
+ rename(sessionId: string, name: string): Promise<Session>;
1013
+ /**
1014
+ * Get the current state of the agent execution for a session.
1015
+ */
1016
+ getAgentState(code: string): Promise<AgentStateInfo>;
1017
+ /**
1018
+ * Cancel a running agent execution for a session.
1019
+ */
1020
+ cancelExecution(code: string): Promise<{
1021
+ status: string;
1022
+ sessionId: string;
1023
+ }>;
1024
+ /**
1025
+ * Steer a running agent execution by injecting an instruction.
1026
+ */
1027
+ steerExecution(code: string, text: string): Promise<SteerAccepted>;
1028
+ }
1029
+
1030
+ declare interface SetProjectSubscriptionInfiniteCreditsRequest {
1031
+ enabled: boolean;
1032
+ }
1033
+
1034
+ export declare interface SkillConfiguration {
1035
+ name?: string;
1036
+ description?: string;
1037
+ instructions?: string;
1038
+ allowedTools?: string[];
1039
+ metadata?: Record<string, unknown>;
1040
+ resources?: SkillResource[];
1041
+ }
1042
+
1043
+ export declare interface SkillResource {
1044
+ path?: string;
1045
+ content?: string;
1046
+ contentType?: string;
1047
+ }
1048
+
1049
+ export declare interface Source {
1050
+ type?: string;
1051
+ url?: string;
1052
+ documentId?: string;
1053
+ pageId?: string;
1054
+ pageNumber?: number;
1055
+ chunks?: SourceChunk[];
1056
+ mostRelevant?: boolean;
1057
+ }
1058
+
1059
+ export declare interface SourceChunk {
1060
+ start?: number;
1061
+ end?: number;
1062
+ }
1063
+
1064
+ export declare interface StartNode extends Node_2 {
1065
+ trigger?: WorkflowTrigger;
1066
+ }
1067
+
1068
+ export declare interface StdioTransport {
1069
+ command?: string;
1070
+ args?: string[];
1071
+ env?: Record<string, string>;
1072
+ cwd?: string;
1073
+ }
1074
+
1075
+ declare interface SteerAccepted {
1076
+ steerId: string;
1077
+ text: string;
1078
+ acceptedAt: string;
1079
+ willProcessAfterTurn: number | null;
1080
+ }
1081
+
1082
+ export declare interface Step {
1083
+ id?: string;
1084
+ nodeId?: string;
1085
+ status?: string;
1086
+ startedAt?: string;
1087
+ endedAt?: string;
1088
+ result?: Record<string, unknown>;
1089
+ error?: string;
1090
+ output?: Record<string, unknown>;
1091
+ }
1092
+
1093
+ export declare interface StmConfiguration {
1094
+ type?: StmType;
1095
+ maxMessages?: number;
1096
+ includeToolCalls?: boolean;
1097
+ model?: ModelConfiguration;
1098
+ maxNumberOfWords?: number;
1099
+ keepLastNObservations?: number;
1100
+ maskingThreshold?: number;
1101
+ summaryThreshold?: number;
1102
+ maxContextTokens?: number;
1103
+ }
1104
+
1105
+ export declare type StmType = 'simple' | 'summary' | 'compact';
1106
+
1107
+ export declare interface Subscription {
1108
+ id?: string;
1109
+ projectId?: string;
1110
+ owner?: string;
1111
+ planType?: string;
1112
+ status?: string;
1113
+ startDate?: string;
1114
+ planCredits?: number;
1115
+ extraCredits?: number;
1116
+ keepCreditsOnRenew?: boolean;
1117
+ endDate?: string;
1118
+ createdAt?: string;
1119
+ updatedAt?: string;
1120
+ stripeCustomerId?: string;
1121
+ stripeSubscriptionId?: string;
1122
+ }
1123
+
1124
+ export declare interface SynthesizerConfiguration {
1125
+ enabled?: boolean;
1126
+ synthesizerName?: SynthesizerName;
1127
+ languageCode?: LanguageCode;
1128
+ voice?: string;
1129
+ sampleRateHertz?: number;
1130
+ speed?: number;
1131
+ similarityBoost?: number;
1132
+ stability?: number;
1133
+ style?: number;
1134
+ voiceInstructions?: string;
1135
+ }
1136
+
1137
+ export declare type SynthesizerName = 'gcloud' | 'elevenlabs' | 'gtts' | 'openai';
1138
+
1139
+ export declare interface SynthesizerVoice {
1140
+ id?: string;
1141
+ name?: string;
1142
+ languageCodes?: string[];
1143
+ gender?: string;
1144
+ }
1145
+
1146
+ export declare interface TelegramConfiguration {
1147
+ enabled?: boolean;
1148
+ botToken?: string;
1149
+ enabledUsers?: string[];
1150
+ }
1151
+
1152
+ export declare interface Tool {
1153
+ type?: ToolType;
1154
+ name?: string;
1155
+ description?: string;
1156
+ config?: ToolConfig;
1157
+ }
1158
+
1159
+ export declare type ToolConfig = ToolLocalConfig | ToolRemoteConfig;
1160
+
1161
+ export declare interface ToolDefinition {
1162
+ name?: string;
1163
+ description?: string;
1164
+ parameters?: Record<string, unknown>;
1165
+ output?: Record<string, unknown>;
1166
+ }
1167
+
1168
+ export declare interface ToolkitConfiguration {
1169
+ tools?: Tool[];
1170
+ }
1171
+
1172
+ export declare interface ToolLocalConfig {
1173
+ parameters?: Record<string, unknown>;
1174
+ output?: Record<string, unknown>;
1175
+ }
1176
+
1177
+ export declare interface ToolRemoteConfig {
1178
+ serviceUrl?: string;
1179
+ secret?: string;
1180
+ timeout?: number;
1181
+ }
1182
+
1183
+ declare type ToolResultItem = string | SessionFile | Image_2 | Record<string, unknown>;
1184
+
1185
+ export declare type ToolType = 'remote' | 'local';
1186
+
1187
+ export declare interface TranscriberConfiguration {
1188
+ enabled?: boolean;
1189
+ transcriberName?: TranscriberName;
1190
+ languageCode?: LanguageCode;
1191
+ sampleRateHertz?: number;
1192
+ }
1193
+
1194
+ export declare type TranscriberName = 'gcloud' | 'deepgram' | 'vosk';
1195
+
1196
+ export declare interface TransferAction {
1197
+ request?: string;
1198
+ thought?: string;
1199
+ agent?: string;
1200
+ functionCallMessage?: Message;
1201
+ functionResponseMessage?: Message;
1202
+ collaborationMode?: SessionCollaborationMode;
1203
+ }
1204
+
1205
+ export declare type Transport = HttpTransport | StdioTransport;
1206
+
1207
+ export declare interface Trigger {
1208
+ id?: string;
1209
+ projectId?: string;
1210
+ name?: string;
1211
+ source?: TriggerSource;
1212
+ destination?: TriggerDestination;
1213
+ enabled?: boolean;
1214
+ createdAt?: string;
1215
+ processedAt?: string;
1216
+ }
1217
+
1218
+ export declare interface TriggerDestination {
1219
+ type?: string;
1220
+ configuration?: Record<string, unknown>;
1221
+ }
1222
+
1223
+ export declare interface TriggerExecutionResult {
1224
+ id?: string;
1225
+ triggerId?: string;
1226
+ success?: boolean;
1227
+ message?: string;
1228
+ processedAt?: string;
1229
+ }
1230
+
1231
+ export declare class TriggerExecutionsApi extends HttpApi {
1232
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
1233
+ list(triggerId: string, page?: number, size?: number): Promise<Paginated<TriggerExecutionResult>>;
1234
+ execute(triggerId: string, execution: TriggerExecutionResult): Promise<TriggerExecutionResult>;
1235
+ get(executionId: string): Promise<TriggerExecutionResult>;
1236
+ remove(executionId: string): Promise<void>;
1237
+ }
1238
+
1239
+ export declare class TriggersApi extends HttpApi {
1240
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
1241
+ list(keyword?: string | null, page?: number, size?: number, extraParams?: Record<string, string>): Promise<Paginated<Trigger>>;
1242
+ create(trigger: Trigger): Promise<Trigger>;
1243
+ update(triggerId: string, trigger: Trigger): Promise<Trigger>;
1244
+ remove(triggerId: string): Promise<void>;
1245
+ get(triggerId: string): Promise<Trigger>;
1246
+ executions(): TriggerExecutionsApi;
1247
+ }
1248
+
1249
+ export declare interface TriggerSource {
1250
+ type?: TriggerSourceType;
1251
+ configuration?: TriggerSourceConfiguration;
1252
+ }
1253
+
1254
+ export declare type TriggerSourceConfiguration = GmailTriggerSourceConfiguration | ImapTriggerSourceConfiguration | Record<string, unknown>;
1255
+
1256
+ export declare type TriggerSourceType = 'webhook' | 'schedule' | 'gmail' | 'imap';
1257
+
1258
+ export declare interface TwilioConfiguration {
1259
+ phoneNumber?: string;
1260
+ }
1261
+
1262
+ export declare interface UpdateCustomerRequest {
1263
+ name?: string;
1264
+ email?: string;
1265
+ phone?: string;
1266
+ }
1267
+
1268
+ export declare interface UpgradeSubscriptionRequest {
1269
+ toPlanType: string;
1270
+ }
1271
+
1272
+ export declare interface UsageCost {
1273
+ service?: string;
1274
+ value?: number;
1275
+ cost?: number;
1276
+ price?: number;
1277
+ credits?: number;
1278
+ unit?: string;
1279
+ }
1280
+
1281
+ export declare interface UsageDailyEntry {
1282
+ date: string;
1283
+ credits: number;
1284
+ count: number;
1285
+ totalCost?: number;
1286
+ totalPrice?: number;
1287
+ }
1288
+
1289
+ export declare interface UsageDetail {
1290
+ service?: string;
1291
+ value?: number;
1292
+ cost?: number;
1293
+ price?: number;
1294
+ credits?: number;
1295
+ unit?: string;
1296
+ [key: string]: unknown;
1297
+ }
1298
+
1299
+ export declare interface UsageModelEntry {
1300
+ model: string;
1301
+ credits: number;
1302
+ count: number;
1303
+ totalCost?: number;
1304
+ totalPrice?: number;
1305
+ }
1306
+
1307
+ export declare interface UsagePage {
1308
+ content: BillingUsage[];
1309
+ totalElements: number;
1310
+ totalPages: number;
1311
+ page: number;
1312
+ size: number;
1313
+ }
1314
+
1315
+ export declare interface UsageStats {
1316
+ subscription: Subscription;
1317
+ totals: UsageTotals;
1318
+ daily: UsageDailyEntry[];
1319
+ byModel: UsageModelEntry[];
1320
+ availableModels: string[];
1321
+ hasCostData?: boolean;
1322
+ costDataMode?: 'actual' | 'estimated_price' | 'mixed' | 'none';
1323
+ hasEstimatedPriceData?: boolean;
1324
+ hasActualCostData?: boolean;
1325
+ costDataWarningCode?: string | null;
1326
+ }
1327
+
1328
+ export declare interface UsageTotals {
1329
+ creditsUsed: number;
1330
+ usageCount: number;
1331
+ previousCreditsUsed: number;
1332
+ totalCost?: number;
1333
+ totalPrice?: number;
1334
+ previousTotalCost?: number;
1335
+ previousTotalPrice?: number;
1336
+ }
1337
+
1338
+ export declare class ValuesApi extends HttpApi {
1339
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
1340
+ get(category: string): Promise<Record<string, unknown>[]>;
1341
+ getLanguageCodes(): Promise<string[]>;
1342
+ getModelNames(): Promise<string[]>;
1343
+ getModelProviders(): Promise<string[]>;
1344
+ getKnowledgeTypes(): Promise<string[]>;
1345
+ getCollaborationModes(): Promise<string[]>;
1346
+ getTranscriberNames(): Promise<string[]>;
1347
+ getSynthesizerNames(): Promise<string[]>;
1348
+ getSynthesizerVoices(synthesizerName: string): Promise<string[]>;
1349
+ getStmTypes(): Promise<string[]>;
1350
+ getDocumentExtractors(): Promise<string[]>;
1351
+ getEmbeddingModels(): Promise<string[]>;
1352
+ getQualityOptions(): Promise<string[]>;
1353
+ getChunkSizeOptions(): Promise<string[]>;
1354
+ getFeatureTypes(): Promise<string[]>;
1355
+ getRoles(): Promise<string[]>;
1356
+ getServiceUnits(): Promise<string[]>;
1357
+ getTriggerSourceTypes(): Promise<string[]>;
1358
+ getTriggerDestinationTypes(): Promise<string[]>;
1359
+ }
1360
+
1361
+ export declare interface Variable {
1362
+ name?: string;
1363
+ source?: VariableSource;
1364
+ defaultValue?: unknown;
1365
+ }
1366
+
1367
+ export declare type VariableDirection = 'in' | 'out';
1368
+
1369
+ export declare interface VariableSource {
1370
+ type?: string;
1371
+ tool?: string;
1372
+ args?: Record<string, unknown>;
1373
+ property?: string;
1374
+ mcpServer?: string;
1375
+ resourceUri?: string;
1376
+ }
1377
+
1378
+ export declare type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'file' | 'list';
1379
+
1380
+ export declare interface WakeupConfiguration {
1381
+ enabled?: boolean;
1382
+ wakeupWords?: string[];
1383
+ sleepWords?: string[];
1384
+ sleepInEachRequest?: boolean;
1385
+ sleepDelaySeconds?: number;
1386
+ }
1387
+
1388
+ export declare interface WhatsAppConfiguration {
1389
+ phoneNumberId?: string;
1390
+ enabledUsers?: string[];
1391
+ }
1392
+
1393
+ export declare interface Workflow {
1394
+ id?: string;
1395
+ projectId?: string;
1396
+ name?: string;
1397
+ description?: string;
1398
+ rootNode?: StartNode;
1399
+ nodes?: Node_2[];
1400
+ connections?: Connection[];
1401
+ features?: Feature[];
1402
+ }
1403
+
1404
+ export declare class WorkflowExecutionsApi extends HttpApi {
1405
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
1406
+ list(workflowId: string, page?: number, size?: number): Promise<Paginated<Execution>>;
1407
+ get(workflowId: string, executionId: string): Promise<Execution>;
1408
+ run(workflowId: string, request: ExecuteRequest): Promise<Execution>;
1409
+ queue(workflowId: string, request: ExecuteRequest): Promise<Execution>;
1410
+ }
1411
+
1412
+ export declare interface WorkflowResult {
1413
+ workflowId?: string;
1414
+ steps?: RunResult[];
1415
+ }
1416
+
1417
+ export declare class WorkflowsApi extends HttpApi {
1418
+ constructor(baseUrl: string, auth: string | AuthenticationProvider);
1419
+ list(keyword?: string | null, page?: number, size?: number, extraParams?: Record<string, string>): Promise<Paginated<Workflow>>;
1420
+ create(workflow: Workflow): Promise<Workflow>;
1421
+ update(workflowId: string, workflow: Workflow): Promise<Workflow>;
1422
+ remove(workflowId: string): Promise<void>;
1423
+ get(workflowId: string): Promise<Workflow>;
1424
+ executions(): WorkflowExecutionsApi;
1425
+ listRevisions(workflowId: string): Promise<RevisionType[]>;
1426
+ getRevision(workflowId: string, revisionId: string): Promise<RevisionType>;
1427
+ rollback(workflowId: string, revisionId: string): Promise<Workflow>;
1428
+ }
1429
+
1430
+ export declare interface WorkflowTrigger {
1431
+ type?: string;
1432
+ }
1433
+
1434
+ export declare interface WorkflowVariable {
1435
+ name?: string;
1436
+ description?: string;
1437
+ type?: VariableType;
1438
+ direction?: VariableDirection;
1439
+ defaultValue?: unknown;
1440
+ }
1441
+
1442
+ export { }