praisonai 1.7.0 → 1.7.2
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/agent/simple.js +19 -2
- package/dist/ai/agent-loop.d.ts +4 -0
- package/dist/ai/agent-loop.js +33 -10
- package/dist/cli/features/external-agents.d.ts +23 -0
- package/dist/cli/features/external-agents.js +84 -0
- package/dist/cli/features/sandbox-executor.d.ts +7 -1
- package/dist/cli/features/sandbox-executor.js +65 -15
- package/dist/index.d.ts +3 -2
- package/dist/index.js +79 -14
- package/dist/mcp/security.d.ts +4 -0
- package/dist/mcp/security.js +33 -10
- package/dist/mcp/server.d.ts +7 -0
- package/dist/mcp/server.js +25 -0
- package/dist/os/agentos.js +19 -0
- package/dist/os/config.d.ts +2 -0
- package/dist/os/config.js +3 -0
- package/dist/parity/index.d.ts +1104 -0
- package/dist/parity/index.js +1366 -0
- package/dist/tools/builtins/code-mode.js +16 -16
- package/dist/tools/index.d.ts +5 -2
- package/dist/tools/index.js +32 -5
- package/dist/tools/registry/index.d.ts +2 -2
- package/dist/tools/registry/index.js +10 -1
- package/dist/tools/registry/registry.d.ts +33 -0
- package/dist/tools/registry/registry.js +79 -1
- package/dist/tools/registry/types.d.ts +17 -0
- package/dist/tools/registry/types.js +22 -1
- package/dist/tools/utility-tools.js +39 -9
- package/dist/workflows/yaml-parser.d.ts +4 -1
- package/dist/workflows/yaml-parser.js +42 -5
- package/package.json +2 -2
|
@@ -0,0 +1,1104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parity Module for PraisonAI TypeScript SDK
|
|
3
|
+
*
|
|
4
|
+
* Implements all remaining P0-P3 gaps for full Python SDK parity.
|
|
5
|
+
*
|
|
6
|
+
* IMPORTANT: Export names MUST match Python SDK exactly for parity tracker detection.
|
|
7
|
+
* The parity tracker extracts export names from index.ts and compares them to Python SDK.
|
|
8
|
+
*
|
|
9
|
+
* Categories:
|
|
10
|
+
* - P0: Specialized Agents & Configs (21 items)
|
|
11
|
+
* - P1: Workflow Patterns (8 items)
|
|
12
|
+
* - P2: Context & Telemetry (19 items)
|
|
13
|
+
* - P3: Advanced Features (49 items)
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* AudioConfig - Configuration for audio processing.
|
|
17
|
+
* Python parity: praisonaiagents/agent/audio_agent.py
|
|
18
|
+
*/
|
|
19
|
+
export interface AudioConfig {
|
|
20
|
+
voice?: string;
|
|
21
|
+
speed?: number;
|
|
22
|
+
format?: 'mp3' | 'wav' | 'ogg' | 'flac';
|
|
23
|
+
sampleRate?: number;
|
|
24
|
+
timeout?: number;
|
|
25
|
+
apiBase?: string;
|
|
26
|
+
apiKey?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* CodeConfig - Configuration for code execution.
|
|
30
|
+
* Python parity: praisonaiagents/agent/code_agent.py
|
|
31
|
+
*/
|
|
32
|
+
export interface CodeConfig {
|
|
33
|
+
sandbox?: boolean;
|
|
34
|
+
timeout?: number;
|
|
35
|
+
allowedLanguages?: string[];
|
|
36
|
+
maxOutputLength?: number;
|
|
37
|
+
workingDirectory?: string;
|
|
38
|
+
environment?: Record<string, string>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* OCRConfig - Configuration for OCR processing.
|
|
42
|
+
* Python parity: praisonaiagents/agent/ocr_agent.py
|
|
43
|
+
*/
|
|
44
|
+
export interface OCRConfig {
|
|
45
|
+
includeImageBase64?: boolean;
|
|
46
|
+
pages?: number[];
|
|
47
|
+
imageLimit?: number;
|
|
48
|
+
timeout?: number;
|
|
49
|
+
apiBase?: string;
|
|
50
|
+
apiKey?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* VisionConfig - Configuration for vision processing.
|
|
54
|
+
* Python parity: praisonaiagents/agent/vision_agent.py
|
|
55
|
+
*/
|
|
56
|
+
export interface VisionConfig {
|
|
57
|
+
detail?: 'low' | 'high' | 'auto';
|
|
58
|
+
maxTokens?: number;
|
|
59
|
+
timeout?: number;
|
|
60
|
+
apiBase?: string;
|
|
61
|
+
apiKey?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* VideoConfig - Configuration for video processing.
|
|
65
|
+
* Python parity: praisonaiagents/agent/video_agent.py
|
|
66
|
+
*/
|
|
67
|
+
export interface VideoConfig {
|
|
68
|
+
frameRate?: number;
|
|
69
|
+
maxFrames?: number;
|
|
70
|
+
resolution?: string;
|
|
71
|
+
timeout?: number;
|
|
72
|
+
apiBase?: string;
|
|
73
|
+
apiKey?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* RealtimeConfig - Configuration for realtime agents.
|
|
77
|
+
* Python parity: praisonaiagents/agent/realtime_agent.py
|
|
78
|
+
*/
|
|
79
|
+
export interface RealtimeConfig {
|
|
80
|
+
voice?: string;
|
|
81
|
+
turnDetection?: 'server_vad' | 'none';
|
|
82
|
+
inputAudioFormat?: string;
|
|
83
|
+
outputAudioFormat?: string;
|
|
84
|
+
temperature?: number;
|
|
85
|
+
maxResponseTokens?: number;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* CodeAgent - Agent for code generation and execution.
|
|
89
|
+
* Python parity: praisonaiagents/agent/code_agent.py
|
|
90
|
+
*/
|
|
91
|
+
export declare class CodeAgent {
|
|
92
|
+
name: string;
|
|
93
|
+
llm: string;
|
|
94
|
+
instructions?: string;
|
|
95
|
+
verbose: boolean;
|
|
96
|
+
private _codeConfig;
|
|
97
|
+
constructor(config?: {
|
|
98
|
+
name?: string;
|
|
99
|
+
llm?: string;
|
|
100
|
+
code?: boolean | CodeConfig;
|
|
101
|
+
instructions?: string;
|
|
102
|
+
verbose?: boolean;
|
|
103
|
+
});
|
|
104
|
+
generate(prompt: string): Promise<string>;
|
|
105
|
+
execute(code: string): Promise<CodeExecutionStep>;
|
|
106
|
+
review(code: string): Promise<string>;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* CodeExecutionStep - Result of code execution.
|
|
110
|
+
* Python parity: praisonaiagents/agent/code_agent.py
|
|
111
|
+
*/
|
|
112
|
+
export interface CodeExecutionStep {
|
|
113
|
+
code: string;
|
|
114
|
+
output: string;
|
|
115
|
+
success: boolean;
|
|
116
|
+
language: string;
|
|
117
|
+
error?: string;
|
|
118
|
+
duration?: number;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* OCRAgent - Agent for OCR processing.
|
|
122
|
+
* Python parity: praisonaiagents/agent/ocr_agent.py
|
|
123
|
+
*/
|
|
124
|
+
export declare class OCRAgent {
|
|
125
|
+
name: string;
|
|
126
|
+
llm: string;
|
|
127
|
+
instructions?: string;
|
|
128
|
+
verbose: boolean;
|
|
129
|
+
private _ocrConfig;
|
|
130
|
+
constructor(config?: {
|
|
131
|
+
name?: string;
|
|
132
|
+
llm?: string;
|
|
133
|
+
ocr?: boolean | OCRConfig;
|
|
134
|
+
instructions?: string;
|
|
135
|
+
verbose?: boolean;
|
|
136
|
+
});
|
|
137
|
+
extract(source: string): Promise<{
|
|
138
|
+
text: string;
|
|
139
|
+
pages: any[];
|
|
140
|
+
}>;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* VisionAgent - Agent for image analysis.
|
|
144
|
+
* Python parity: praisonaiagents/agent/vision_agent.py
|
|
145
|
+
*/
|
|
146
|
+
export declare class VisionAgent {
|
|
147
|
+
name: string;
|
|
148
|
+
llm: string;
|
|
149
|
+
instructions?: string;
|
|
150
|
+
verbose: boolean;
|
|
151
|
+
private _visionConfig;
|
|
152
|
+
constructor(config?: {
|
|
153
|
+
name?: string;
|
|
154
|
+
llm?: string;
|
|
155
|
+
vision?: boolean | VisionConfig;
|
|
156
|
+
instructions?: string;
|
|
157
|
+
verbose?: boolean;
|
|
158
|
+
});
|
|
159
|
+
describe(imageUrl: string): Promise<string>;
|
|
160
|
+
analyze(imageUrl: string, prompt?: string): Promise<string>;
|
|
161
|
+
compare(images: string[]): Promise<string>;
|
|
162
|
+
extractText(imageUrl: string): Promise<string>;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* VideoAgent - Agent for video processing.
|
|
166
|
+
* Python parity: praisonaiagents/agent/video_agent.py
|
|
167
|
+
*/
|
|
168
|
+
export declare class VideoAgent {
|
|
169
|
+
name: string;
|
|
170
|
+
llm: string;
|
|
171
|
+
instructions?: string;
|
|
172
|
+
verbose: boolean;
|
|
173
|
+
private _videoConfig;
|
|
174
|
+
constructor(config?: {
|
|
175
|
+
name?: string;
|
|
176
|
+
llm?: string;
|
|
177
|
+
video?: boolean | VideoConfig;
|
|
178
|
+
instructions?: string;
|
|
179
|
+
verbose?: boolean;
|
|
180
|
+
});
|
|
181
|
+
analyze(videoUrl: string, prompt?: string): Promise<string>;
|
|
182
|
+
summarize(videoUrl: string): Promise<string>;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* RealtimeAgent - Agent for realtime voice interactions.
|
|
186
|
+
* Python parity: praisonaiagents/agent/realtime_agent.py
|
|
187
|
+
*/
|
|
188
|
+
export declare class RealtimeAgent {
|
|
189
|
+
name: string;
|
|
190
|
+
llm: string;
|
|
191
|
+
instructions?: string;
|
|
192
|
+
verbose: boolean;
|
|
193
|
+
private _realtimeConfig;
|
|
194
|
+
constructor(config?: {
|
|
195
|
+
name?: string;
|
|
196
|
+
llm?: string;
|
|
197
|
+
realtime?: boolean | RealtimeConfig;
|
|
198
|
+
instructions?: string;
|
|
199
|
+
verbose?: boolean;
|
|
200
|
+
});
|
|
201
|
+
connect(): Promise<void>;
|
|
202
|
+
disconnect(): Promise<void>;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* EmbeddingAgent - Agent for generating embeddings.
|
|
206
|
+
* Python parity: praisonaiagents/agent/embedding_agent.py
|
|
207
|
+
*/
|
|
208
|
+
export declare class EmbeddingAgent {
|
|
209
|
+
name: string;
|
|
210
|
+
llm: string;
|
|
211
|
+
instructions?: string;
|
|
212
|
+
verbose: boolean;
|
|
213
|
+
constructor(config?: {
|
|
214
|
+
name?: string;
|
|
215
|
+
llm?: string;
|
|
216
|
+
instructions?: string;
|
|
217
|
+
verbose?: boolean;
|
|
218
|
+
});
|
|
219
|
+
embed(text: string): Promise<number[]>;
|
|
220
|
+
embedBatch(texts: string[]): Promise<number[][]>;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* MCPCall - MCP tool call result.
|
|
224
|
+
* Python parity: praisonaiagents/agent/agent.py
|
|
225
|
+
*/
|
|
226
|
+
export interface MCPCall {
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
arguments: Record<string, any>;
|
|
230
|
+
result?: any;
|
|
231
|
+
error?: string;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* WebSearchCall - Web search call result.
|
|
235
|
+
* Python parity: praisonaiagents/agent/agent.py
|
|
236
|
+
*/
|
|
237
|
+
export interface WebSearchCall {
|
|
238
|
+
id: string;
|
|
239
|
+
query: string;
|
|
240
|
+
results: Array<{
|
|
241
|
+
title: string;
|
|
242
|
+
url: string;
|
|
243
|
+
snippet: string;
|
|
244
|
+
}>;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* FileSearchCall - File search call result.
|
|
248
|
+
* Python parity: praisonaiagents/agent/agent.py
|
|
249
|
+
*/
|
|
250
|
+
export interface FileSearchCall {
|
|
251
|
+
id: string;
|
|
252
|
+
query: string;
|
|
253
|
+
files: Array<{
|
|
254
|
+
path: string;
|
|
255
|
+
content: string;
|
|
256
|
+
score: number;
|
|
257
|
+
}>;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* DeepResearchResponse - Deep research response.
|
|
261
|
+
* Python parity: praisonaiagents/agent/deep_research.py
|
|
262
|
+
*/
|
|
263
|
+
export interface DeepResearchResponse {
|
|
264
|
+
query: string;
|
|
265
|
+
summary: string;
|
|
266
|
+
sources: Array<{
|
|
267
|
+
title: string;
|
|
268
|
+
url: string;
|
|
269
|
+
relevance: number;
|
|
270
|
+
}>;
|
|
271
|
+
sections: Array<{
|
|
272
|
+
title: string;
|
|
273
|
+
content: string;
|
|
274
|
+
}>;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Provider - LLM provider type.
|
|
278
|
+
* Python parity: praisonaiagents/llm
|
|
279
|
+
*/
|
|
280
|
+
export type Provider = 'openai' | 'anthropic' | 'google' | 'mistral' | 'groq' | 'together' | 'ollama' | 'azure' | 'bedrock' | 'custom';
|
|
281
|
+
/**
|
|
282
|
+
* Create a context agent for handoff.
|
|
283
|
+
* Python parity: praisonaiagents/agent/handoff.py
|
|
284
|
+
*/
|
|
285
|
+
export declare function createContextAgent(config: {
|
|
286
|
+
name: string;
|
|
287
|
+
instructions?: string;
|
|
288
|
+
tools?: any[];
|
|
289
|
+
handoffs?: any[];
|
|
290
|
+
}): any;
|
|
291
|
+
/**
|
|
292
|
+
* Handoff filters for agent handoff.
|
|
293
|
+
* Python parity: praisonaiagents/agent/handoff.py
|
|
294
|
+
*/
|
|
295
|
+
export declare const handoffFilters: {
|
|
296
|
+
/**
|
|
297
|
+
* Filter to remove tool calls from handoff.
|
|
298
|
+
*/
|
|
299
|
+
removeToolCalls: (messages: any[]) => any[];
|
|
300
|
+
/**
|
|
301
|
+
* Filter to keep only last N messages.
|
|
302
|
+
*/
|
|
303
|
+
keepLastN: (n: number) => (messages: any[]) => any[];
|
|
304
|
+
/**
|
|
305
|
+
* Filter to remove system messages.
|
|
306
|
+
*/
|
|
307
|
+
removeSystemMessages: (messages: any[]) => any[];
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* Generate prompt with handoff instructions.
|
|
311
|
+
* Python parity: praisonaiagents/agent/handoff.py
|
|
312
|
+
*/
|
|
313
|
+
export declare function promptWithHandoffInstructions(basePrompt: string, handoffs: Array<{
|
|
314
|
+
name: string;
|
|
315
|
+
description?: string;
|
|
316
|
+
}>): string;
|
|
317
|
+
/**
|
|
318
|
+
* Loop workflow pattern.
|
|
319
|
+
* Python parity: praisonaiagents/workflows/workflows.py
|
|
320
|
+
*/
|
|
321
|
+
export declare class Loop {
|
|
322
|
+
private agents;
|
|
323
|
+
private maxIterations;
|
|
324
|
+
private condition?;
|
|
325
|
+
constructor(config: {
|
|
326
|
+
agents: any[];
|
|
327
|
+
maxIterations?: number;
|
|
328
|
+
condition?: (result: any, iteration: number) => boolean;
|
|
329
|
+
});
|
|
330
|
+
run(input: string): Promise<any>;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Parallel workflow pattern.
|
|
334
|
+
* Python parity: praisonaiagents/workflows/workflows.py
|
|
335
|
+
*/
|
|
336
|
+
export declare class Parallel {
|
|
337
|
+
private agents;
|
|
338
|
+
constructor(config: {
|
|
339
|
+
agents: any[];
|
|
340
|
+
});
|
|
341
|
+
run(input: string): Promise<any[]>;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Route workflow pattern.
|
|
345
|
+
* Python parity: praisonaiagents/workflows/workflows.py
|
|
346
|
+
*/
|
|
347
|
+
export declare class Route {
|
|
348
|
+
private routes;
|
|
349
|
+
private defaultAgent?;
|
|
350
|
+
private router;
|
|
351
|
+
constructor(config: {
|
|
352
|
+
routes: Record<string, any>;
|
|
353
|
+
default?: any;
|
|
354
|
+
router: (input: string) => string;
|
|
355
|
+
});
|
|
356
|
+
run(input: string): Promise<any>;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* If workflow pattern (conditional).
|
|
360
|
+
* Python parity: praisonaiagents/workflows/workflows.py
|
|
361
|
+
*/
|
|
362
|
+
export declare class If {
|
|
363
|
+
private condition;
|
|
364
|
+
private thenAgent;
|
|
365
|
+
private elseAgent?;
|
|
366
|
+
constructor(config: {
|
|
367
|
+
condition: (input: any) => boolean;
|
|
368
|
+
then: any;
|
|
369
|
+
else?: any;
|
|
370
|
+
});
|
|
371
|
+
run(input: string): Promise<any>;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* When helper for conditional workflows.
|
|
375
|
+
* Python parity: praisonaiagents/workflows/workflows.py
|
|
376
|
+
*/
|
|
377
|
+
export declare function when(condition: (input: any) => boolean, thenAgent: any, elseAgent?: any): If;
|
|
378
|
+
/**
|
|
379
|
+
* Chunking class for text splitting.
|
|
380
|
+
* Python parity: praisonaiagents/knowledge/chunking.py
|
|
381
|
+
*/
|
|
382
|
+
export declare class Chunking {
|
|
383
|
+
private chunkSize;
|
|
384
|
+
private chunkOverlap;
|
|
385
|
+
private separator;
|
|
386
|
+
constructor(config?: {
|
|
387
|
+
chunkSize?: number;
|
|
388
|
+
chunkOverlap?: number;
|
|
389
|
+
separator?: string;
|
|
390
|
+
});
|
|
391
|
+
split(text: string): string[];
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Knowledge class for knowledge base management.
|
|
395
|
+
* Python parity: praisonaiagents/knowledge/knowledge.py
|
|
396
|
+
*/
|
|
397
|
+
export declare class Knowledge {
|
|
398
|
+
private sources;
|
|
399
|
+
private chunking;
|
|
400
|
+
constructor(config?: {
|
|
401
|
+
sources?: string[];
|
|
402
|
+
chunkSize?: number;
|
|
403
|
+
chunkOverlap?: number;
|
|
404
|
+
});
|
|
405
|
+
add(source: string): Promise<void>;
|
|
406
|
+
search(query: string, topK?: number): Promise<any[]>;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Session class for session management.
|
|
410
|
+
* Python parity: praisonaiagents/session/session.py
|
|
411
|
+
*/
|
|
412
|
+
export declare class Session {
|
|
413
|
+
id: string;
|
|
414
|
+
private messages;
|
|
415
|
+
private metadata;
|
|
416
|
+
constructor(config?: {
|
|
417
|
+
id?: string;
|
|
418
|
+
metadata?: Record<string, any>;
|
|
419
|
+
});
|
|
420
|
+
addMessage(message: any): void;
|
|
421
|
+
getMessages(): any[];
|
|
422
|
+
clear(): void;
|
|
423
|
+
setMetadata(key: string, value: any): void;
|
|
424
|
+
getMetadata(key: string): any;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* ContextConfig - Configuration for context management.
|
|
428
|
+
* Python parity: praisonaiagents/context/fast.py
|
|
429
|
+
*/
|
|
430
|
+
export interface ContextConfig {
|
|
431
|
+
maxTokens?: number;
|
|
432
|
+
strategy?: 'truncate' | 'summarize' | 'sliding';
|
|
433
|
+
preserveSystemPrompt?: boolean;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* ContextManager - Manages conversation context.
|
|
437
|
+
* Python parity: praisonaiagents/context/fast.py
|
|
438
|
+
*/
|
|
439
|
+
export declare class ContextManager {
|
|
440
|
+
private config;
|
|
441
|
+
private messages;
|
|
442
|
+
constructor(config?: ContextConfig);
|
|
443
|
+
add(message: any): void;
|
|
444
|
+
getOptimized(): any[];
|
|
445
|
+
clear(): void;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* ContextPack - Packed context for RAG.
|
|
449
|
+
* Python parity: praisonaiagents/rag/rag.py
|
|
450
|
+
*/
|
|
451
|
+
export interface ContextPack {
|
|
452
|
+
query: string;
|
|
453
|
+
context: string;
|
|
454
|
+
sources: Array<{
|
|
455
|
+
content: string;
|
|
456
|
+
metadata: Record<string, any>;
|
|
457
|
+
score: number;
|
|
458
|
+
}>;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* FastContext - Fast context retrieval.
|
|
462
|
+
* Python parity: praisonaiagents/context/fast.py
|
|
463
|
+
*/
|
|
464
|
+
export declare class FastContext {
|
|
465
|
+
private directory;
|
|
466
|
+
private extensions;
|
|
467
|
+
constructor(config: {
|
|
468
|
+
directory: string;
|
|
469
|
+
extensions?: string[];
|
|
470
|
+
});
|
|
471
|
+
search(query: string): Promise<LineRange[]>;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* LineRange - Range of lines in a file.
|
|
475
|
+
* Python parity: praisonaiagents/context/fast.py
|
|
476
|
+
*/
|
|
477
|
+
export interface LineRange {
|
|
478
|
+
file: string;
|
|
479
|
+
startLine: number;
|
|
480
|
+
endLine: number;
|
|
481
|
+
content: string;
|
|
482
|
+
score: number;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* GuardrailResult - Result of guardrail check.
|
|
486
|
+
* Python parity: praisonaiagents/guardrails/guardrails.py
|
|
487
|
+
*/
|
|
488
|
+
export interface GuardrailResult {
|
|
489
|
+
passed: boolean;
|
|
490
|
+
action: 'allow' | 'block' | 'warn' | 'modify';
|
|
491
|
+
message?: string;
|
|
492
|
+
modifiedContent?: string;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* MCP - Model Context Protocol client.
|
|
496
|
+
* Python parity: praisonaiagents/mcp/mcp.py
|
|
497
|
+
*/
|
|
498
|
+
export declare class MCP {
|
|
499
|
+
private servers;
|
|
500
|
+
constructor();
|
|
501
|
+
connect(name: string, config: any): Promise<void>;
|
|
502
|
+
disconnect(name: string): Promise<void>;
|
|
503
|
+
callTool(server: string, tool: string, args: any): Promise<any>;
|
|
504
|
+
listServers(): string[];
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* ManagerConfig - Configuration for agent manager.
|
|
508
|
+
* Python parity: praisonaiagents/agents/agents.py
|
|
509
|
+
*/
|
|
510
|
+
export interface ManagerConfig {
|
|
511
|
+
verbose?: boolean;
|
|
512
|
+
process?: 'sequential' | 'parallel' | 'hierarchical';
|
|
513
|
+
managerLlm?: string;
|
|
514
|
+
maxIterations?: number;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* MinimalTelemetry - Minimal telemetry collector.
|
|
518
|
+
* Python parity: praisonaiagents/telemetry/telemetry.py
|
|
519
|
+
*/
|
|
520
|
+
export declare class MinimalTelemetry {
|
|
521
|
+
private enabled;
|
|
522
|
+
private events;
|
|
523
|
+
constructor(enabled?: boolean);
|
|
524
|
+
track(event: string, data?: Record<string, any>): void;
|
|
525
|
+
getEvents(): any[];
|
|
526
|
+
clear(): void;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* OptimizerStrategy - Strategy for context optimization.
|
|
530
|
+
* Python parity: praisonaiagents/context/fast.py
|
|
531
|
+
*/
|
|
532
|
+
export type OptimizerStrategy = 'truncate' | 'summarize' | 'sliding' | 'semantic';
|
|
533
|
+
/**
|
|
534
|
+
* Plan - Execution plan.
|
|
535
|
+
* Python parity: praisonaiagents/planning/planning.py
|
|
536
|
+
*/
|
|
537
|
+
export declare class Plan {
|
|
538
|
+
id: string;
|
|
539
|
+
steps: PlanStep[];
|
|
540
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
541
|
+
constructor(config?: {
|
|
542
|
+
id?: string;
|
|
543
|
+
steps?: PlanStep[];
|
|
544
|
+
});
|
|
545
|
+
addStep(step: PlanStep): void;
|
|
546
|
+
execute(): Promise<any>;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* PlanStep - Step in an execution plan.
|
|
550
|
+
* Python parity: praisonaiagents/planning/planning.py
|
|
551
|
+
*/
|
|
552
|
+
export interface PlanStep {
|
|
553
|
+
id: string;
|
|
554
|
+
description: string;
|
|
555
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
556
|
+
result?: any;
|
|
557
|
+
dependencies?: string[];
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* SkillLoader - Loads skills from files.
|
|
561
|
+
* Python parity: praisonaiagents/skills/loader.py
|
|
562
|
+
*/
|
|
563
|
+
export declare class SkillLoader {
|
|
564
|
+
private directories;
|
|
565
|
+
constructor(directories?: string[]);
|
|
566
|
+
load(name: string): Promise<any>;
|
|
567
|
+
loadAll(): Promise<any[]>;
|
|
568
|
+
addDirectory(dir: string): void;
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* ApprovalCallback - Callback for approval requests.
|
|
572
|
+
* Python parity: praisonaiagents/planning/planning.py
|
|
573
|
+
*/
|
|
574
|
+
export type ApprovalCallback = (request: {
|
|
575
|
+
action: string;
|
|
576
|
+
description: string;
|
|
577
|
+
data?: any;
|
|
578
|
+
}) => Promise<boolean>;
|
|
579
|
+
/**
|
|
580
|
+
* Enable telemetry collection.
|
|
581
|
+
* Python parity: praisonaiagents/telemetry
|
|
582
|
+
*/
|
|
583
|
+
export declare function enableTelemetry(): void;
|
|
584
|
+
/**
|
|
585
|
+
* Disable telemetry collection.
|
|
586
|
+
* Python parity: praisonaiagents/telemetry
|
|
587
|
+
*/
|
|
588
|
+
export declare function disableTelemetry(): void;
|
|
589
|
+
/**
|
|
590
|
+
* Get telemetry collector.
|
|
591
|
+
* Python parity: praisonaiagents/telemetry
|
|
592
|
+
*/
|
|
593
|
+
export declare function getTelemetry(): MinimalTelemetry | null;
|
|
594
|
+
/**
|
|
595
|
+
* Enable performance mode.
|
|
596
|
+
* Python parity: praisonaiagents/telemetry
|
|
597
|
+
*/
|
|
598
|
+
export declare function enablePerformanceMode(): void;
|
|
599
|
+
/**
|
|
600
|
+
* Disable performance mode.
|
|
601
|
+
* Python parity: praisonaiagents/telemetry
|
|
602
|
+
*/
|
|
603
|
+
export declare function disablePerformanceMode(): void;
|
|
604
|
+
/**
|
|
605
|
+
* Cleanup telemetry resources.
|
|
606
|
+
* Python parity: praisonaiagents/telemetry
|
|
607
|
+
*/
|
|
608
|
+
export declare function cleanupTelemetryResources(): void;
|
|
609
|
+
type DisplayCallback = (data: any) => void | Promise<void>;
|
|
610
|
+
/**
|
|
611
|
+
* Register a display callback.
|
|
612
|
+
* Python parity: praisonaiagents/main.py
|
|
613
|
+
*/
|
|
614
|
+
export declare function registerDisplayCallback(callback: DisplayCallback, async_?: boolean): void;
|
|
615
|
+
/**
|
|
616
|
+
* Get sync display callbacks.
|
|
617
|
+
* Python parity: praisonaiagents/main.py
|
|
618
|
+
*/
|
|
619
|
+
export declare function syncDisplayCallbacks(): DisplayCallback[];
|
|
620
|
+
/**
|
|
621
|
+
* Get async display callbacks.
|
|
622
|
+
* Python parity: praisonaiagents/main.py
|
|
623
|
+
*/
|
|
624
|
+
export declare function asyncDisplayCallbacks(): DisplayCallback[];
|
|
625
|
+
/**
|
|
626
|
+
* Display error message.
|
|
627
|
+
* Python parity: praisonaiagents/main.py
|
|
628
|
+
*/
|
|
629
|
+
export declare function displayError(message: string): void;
|
|
630
|
+
/**
|
|
631
|
+
* Display generating message.
|
|
632
|
+
* Python parity: praisonaiagents/main.py
|
|
633
|
+
*/
|
|
634
|
+
export declare function displayGenerating(agentName: string): void;
|
|
635
|
+
/**
|
|
636
|
+
* Display instruction message.
|
|
637
|
+
* Python parity: praisonaiagents/main.py
|
|
638
|
+
*/
|
|
639
|
+
export declare function displayInstruction(instruction: string): void;
|
|
640
|
+
/**
|
|
641
|
+
* Display interaction message.
|
|
642
|
+
* Python parity: praisonaiagents/main.py
|
|
643
|
+
*/
|
|
644
|
+
export declare function displayInteraction(from: string, to: string, message: string): void;
|
|
645
|
+
/**
|
|
646
|
+
* Display self reflection message.
|
|
647
|
+
* Python parity: praisonaiagents/main.py
|
|
648
|
+
*/
|
|
649
|
+
export declare function displaySelfReflection(agentName: string, reflection: string): void;
|
|
650
|
+
/**
|
|
651
|
+
* Display tool call message.
|
|
652
|
+
* Python parity: praisonaiagents/main.py
|
|
653
|
+
*/
|
|
654
|
+
export declare function displayToolCall(toolName: string, args: any): void;
|
|
655
|
+
/**
|
|
656
|
+
* Get error logs.
|
|
657
|
+
* Python parity: praisonaiagents/main.py
|
|
658
|
+
*/
|
|
659
|
+
export declare function errorLogs(): string[];
|
|
660
|
+
/**
|
|
661
|
+
* Plugin class.
|
|
662
|
+
* Python parity: praisonaiagents/plugins
|
|
663
|
+
*/
|
|
664
|
+
export declare class Plugin {
|
|
665
|
+
name: string;
|
|
666
|
+
version: string;
|
|
667
|
+
description?: string;
|
|
668
|
+
hooks: PluginHook[];
|
|
669
|
+
constructor(config: {
|
|
670
|
+
name: string;
|
|
671
|
+
version?: string;
|
|
672
|
+
description?: string;
|
|
673
|
+
hooks?: PluginHook[];
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* PluginHook - Hook for plugin.
|
|
678
|
+
* Python parity: praisonaiagents/plugins
|
|
679
|
+
*/
|
|
680
|
+
export interface PluginHook {
|
|
681
|
+
event: string;
|
|
682
|
+
handler: (...args: any[]) => any;
|
|
683
|
+
priority?: number;
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* PluginMetadata - Metadata for plugin.
|
|
687
|
+
* Python parity: praisonaiagents/plugins
|
|
688
|
+
*/
|
|
689
|
+
export interface PluginMetadata {
|
|
690
|
+
name: string;
|
|
691
|
+
version: string;
|
|
692
|
+
author?: string;
|
|
693
|
+
description?: string;
|
|
694
|
+
dependencies?: string[];
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Get plugin manager.
|
|
698
|
+
* Python parity: praisonaiagents/plugins
|
|
699
|
+
*/
|
|
700
|
+
export declare function getPluginManager(): any;
|
|
701
|
+
/**
|
|
702
|
+
* Get default plugin directories.
|
|
703
|
+
* Python parity: praisonaiagents/plugins
|
|
704
|
+
*/
|
|
705
|
+
export declare function getDefaultPluginDirs(): string[];
|
|
706
|
+
/**
|
|
707
|
+
* Ensure plugin directory exists.
|
|
708
|
+
* Python parity: praisonaiagents/plugins
|
|
709
|
+
*/
|
|
710
|
+
export declare function ensurePluginDir(dir: string): void;
|
|
711
|
+
/**
|
|
712
|
+
* Get plugin template.
|
|
713
|
+
* Python parity: praisonaiagents/plugins
|
|
714
|
+
*/
|
|
715
|
+
export declare function getPluginTemplate(): string;
|
|
716
|
+
/**
|
|
717
|
+
* Load plugin from file.
|
|
718
|
+
* Python parity: praisonaiagents/plugins
|
|
719
|
+
*/
|
|
720
|
+
export declare function loadPlugin(path: string): Promise<Plugin | null>;
|
|
721
|
+
/**
|
|
722
|
+
* Parse plugin header.
|
|
723
|
+
* Python parity: praisonaiagents/plugins
|
|
724
|
+
*/
|
|
725
|
+
export declare function parsePluginHeader(content: string): PluginMetadata | null;
|
|
726
|
+
/**
|
|
727
|
+
* Parse plugin header from file.
|
|
728
|
+
* Python parity: praisonaiagents/plugins
|
|
729
|
+
*/
|
|
730
|
+
export declare function parsePluginHeaderFromFile(path: string): Promise<PluginMetadata | null>;
|
|
731
|
+
/**
|
|
732
|
+
* Discover plugins in directories.
|
|
733
|
+
* Python parity: praisonaiagents/plugins
|
|
734
|
+
*/
|
|
735
|
+
export declare function discoverPlugins(dirs?: string[]): Promise<string[]>;
|
|
736
|
+
/**
|
|
737
|
+
* Discover and load plugins.
|
|
738
|
+
* Python parity: praisonaiagents/plugins
|
|
739
|
+
*/
|
|
740
|
+
export declare function discoverAndLoadPlugins(dirs?: string[]): Promise<Plugin[]>;
|
|
741
|
+
/**
|
|
742
|
+
* TraceSink - Sink for trace events.
|
|
743
|
+
* Python parity: praisonaiagents/trace
|
|
744
|
+
*/
|
|
745
|
+
export declare class TraceSink {
|
|
746
|
+
private events;
|
|
747
|
+
constructor();
|
|
748
|
+
emit(event: any): void;
|
|
749
|
+
getEvents(): any[];
|
|
750
|
+
clear(): void;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* ContextEvent - Context event type.
|
|
754
|
+
* Python parity: praisonaiagents/trace
|
|
755
|
+
*/
|
|
756
|
+
export interface ContextEvent {
|
|
757
|
+
type: ContextEventType;
|
|
758
|
+
timestamp: number;
|
|
759
|
+
agentName?: string;
|
|
760
|
+
data?: Record<string, any>;
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* ContextEventType - Types of context events.
|
|
764
|
+
* Python parity: praisonaiagents/trace
|
|
765
|
+
*/
|
|
766
|
+
export declare enum ContextEventType {
|
|
767
|
+
AGENT_START = "agent_start",
|
|
768
|
+
AGENT_END = "agent_end",
|
|
769
|
+
TOOL_CALL = "tool_call",
|
|
770
|
+
TOOL_RESULT = "tool_result",
|
|
771
|
+
LLM_REQUEST = "llm_request",
|
|
772
|
+
LLM_RESPONSE = "llm_response",
|
|
773
|
+
ERROR = "error",
|
|
774
|
+
HANDOFF = "handoff"
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* ConditionProtocol - Protocol for conditions.
|
|
778
|
+
* Python parity: praisonaiagents/conditions
|
|
779
|
+
*/
|
|
780
|
+
export interface ConditionProtocol {
|
|
781
|
+
evaluate(context: any): boolean;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* DictCondition - Dictionary-based condition.
|
|
785
|
+
* Python parity: praisonaiagents/conditions
|
|
786
|
+
*/
|
|
787
|
+
export declare class DictCondition implements ConditionProtocol {
|
|
788
|
+
private conditions;
|
|
789
|
+
constructor(conditions: Record<string, any>);
|
|
790
|
+
evaluate(context: any): boolean;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Evaluate a condition.
|
|
794
|
+
* Python parity: praisonaiagents/conditions
|
|
795
|
+
*/
|
|
796
|
+
export declare function evaluateCondition(condition: ConditionProtocol | Record<string, any> | ((ctx: any) => boolean), context: any): boolean;
|
|
797
|
+
/**
|
|
798
|
+
* EmbeddingResult - Result of embedding operation.
|
|
799
|
+
* Python parity: praisonaiagents/embedding
|
|
800
|
+
*/
|
|
801
|
+
export interface EmbeddingResult {
|
|
802
|
+
embedding: number[];
|
|
803
|
+
model: string;
|
|
804
|
+
usage?: {
|
|
805
|
+
promptTokens: number;
|
|
806
|
+
totalTokens: number;
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* Get embedding dimensions.
|
|
811
|
+
* Python parity: praisonaiagents/embedding
|
|
812
|
+
*/
|
|
813
|
+
export declare function getDimensions(model: string): number;
|
|
814
|
+
/**
|
|
815
|
+
* Embed text.
|
|
816
|
+
* Python parity: praisonaiagents/embedding
|
|
817
|
+
*/
|
|
818
|
+
export declare function embed(text: string, model?: string): Promise<number[]>;
|
|
819
|
+
/**
|
|
820
|
+
* FlowDisplay - Display for workflow execution.
|
|
821
|
+
* Python parity: praisonaiagents/flow_display
|
|
822
|
+
*/
|
|
823
|
+
export declare class FlowDisplay {
|
|
824
|
+
private steps;
|
|
825
|
+
constructor();
|
|
826
|
+
addStep(step: any): void;
|
|
827
|
+
render(): string;
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Track workflow execution.
|
|
831
|
+
* Python parity: praisonaiagents/flow_display
|
|
832
|
+
*/
|
|
833
|
+
export declare function trackWorkflow(name: string): FlowDisplay;
|
|
834
|
+
/**
|
|
835
|
+
* FailoverManager - Manages LLM failover.
|
|
836
|
+
* Python parity: praisonaiagents/llm/failover.py
|
|
837
|
+
*/
|
|
838
|
+
export declare class FailoverManager {
|
|
839
|
+
private providers;
|
|
840
|
+
private currentIndex;
|
|
841
|
+
constructor(providers: string[]);
|
|
842
|
+
getCurrentProvider(): string;
|
|
843
|
+
failover(): string | null;
|
|
844
|
+
reset(): void;
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* ProviderStatus - Status of an LLM provider.
|
|
848
|
+
* Python parity: praisonaiagents/llm/failover.py
|
|
849
|
+
*/
|
|
850
|
+
export interface ProviderStatus {
|
|
851
|
+
name: string;
|
|
852
|
+
available: boolean;
|
|
853
|
+
latency?: number;
|
|
854
|
+
errorCount: number;
|
|
855
|
+
lastError?: string;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* SandboxStatus - Status of sandbox execution.
|
|
859
|
+
* Python parity: praisonaiagents/sandbox
|
|
860
|
+
*/
|
|
861
|
+
export declare enum SandboxStatus {
|
|
862
|
+
IDLE = "idle",
|
|
863
|
+
RUNNING = "running",
|
|
864
|
+
COMPLETED = "completed",
|
|
865
|
+
FAILED = "failed",
|
|
866
|
+
TIMEOUT = "timeout"
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Task - Task for workflow execution.
|
|
870
|
+
* Python parity: praisonaiagents/task/task.py
|
|
871
|
+
*/
|
|
872
|
+
export declare class Task {
|
|
873
|
+
name: string;
|
|
874
|
+
description: string;
|
|
875
|
+
expectedOutput?: string;
|
|
876
|
+
agent?: any;
|
|
877
|
+
dependencies?: Task[];
|
|
878
|
+
constructor(config: {
|
|
879
|
+
name: string;
|
|
880
|
+
description: string;
|
|
881
|
+
expectedOutput?: string;
|
|
882
|
+
agent?: any;
|
|
883
|
+
dependencies?: Task[];
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* GatewayConfig - Configuration for gateway.
|
|
888
|
+
* Python parity: praisonaiagents/gateway
|
|
889
|
+
*/
|
|
890
|
+
export interface GatewayConfig {
|
|
891
|
+
url: string;
|
|
892
|
+
apiKey?: string;
|
|
893
|
+
timeout?: number;
|
|
894
|
+
retries?: number;
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* BotConfig - Configuration for bot.
|
|
898
|
+
* Python parity: praisonaiagents/bots
|
|
899
|
+
*/
|
|
900
|
+
export interface BotConfig {
|
|
901
|
+
name: string;
|
|
902
|
+
token?: string;
|
|
903
|
+
prefix?: string;
|
|
904
|
+
channels?: string[];
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* MEMORY_PRESETS - Memory configuration presets.
|
|
908
|
+
* Python parity: praisonaiagents/config/presets.py
|
|
909
|
+
*/
|
|
910
|
+
export declare const MEMORY_PRESETS: Record<string, any>;
|
|
911
|
+
/**
|
|
912
|
+
* MemoryBackend - Backend for memory storage.
|
|
913
|
+
* Python parity: praisonaiagents/memory
|
|
914
|
+
*/
|
|
915
|
+
export declare enum MemoryBackend {
|
|
916
|
+
IN_MEMORY = "in_memory",
|
|
917
|
+
FILE = "file",
|
|
918
|
+
SQLITE = "sqlite",
|
|
919
|
+
REDIS = "redis",
|
|
920
|
+
CHROMA = "chroma"
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* ConfigValidationError - Error for config validation.
|
|
924
|
+
* Python parity: praisonaiagents/config
|
|
925
|
+
*/
|
|
926
|
+
export declare class ConfigValidationError extends Error {
|
|
927
|
+
field: string;
|
|
928
|
+
value: any;
|
|
929
|
+
constructor(field: string, value: any, message: string);
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Detect URL scheme.
|
|
933
|
+
* Python parity: praisonaiagents/config
|
|
934
|
+
*/
|
|
935
|
+
export declare function detectUrlScheme(url: string): string;
|
|
936
|
+
/**
|
|
937
|
+
* Resolve configuration.
|
|
938
|
+
* Python parity: praisonaiagents/config/param_resolver.py
|
|
939
|
+
*/
|
|
940
|
+
export declare function resolve<T>(value: T | string | boolean | undefined, presets: Record<string, T>, defaultValue: T): T;
|
|
941
|
+
/**
|
|
942
|
+
* Resolve guardrail policies.
|
|
943
|
+
* Python parity: praisonaiagents/config/resolvers.py
|
|
944
|
+
*/
|
|
945
|
+
export declare function resolveGuardrailPolicies(policies: (string | any)[]): any[];
|
|
946
|
+
/**
|
|
947
|
+
* Trace context.
|
|
948
|
+
* Python parity: praisonaiagents/trace
|
|
949
|
+
*/
|
|
950
|
+
export declare function traceContext(name: string): TraceSink;
|
|
951
|
+
/**
|
|
952
|
+
* AGUI - Agent GUI protocol.
|
|
953
|
+
* Python parity: praisonaiagents/ui/agui
|
|
954
|
+
*/
|
|
955
|
+
export declare class AGUI {
|
|
956
|
+
private config;
|
|
957
|
+
constructor(config: {
|
|
958
|
+
name: string;
|
|
959
|
+
description?: string;
|
|
960
|
+
});
|
|
961
|
+
getName(): string;
|
|
962
|
+
getRouter(): any;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* AgentManager - Alias for AgentTeam.
|
|
966
|
+
* Python parity: praisonaiagents/agents/agents.py
|
|
967
|
+
*/
|
|
968
|
+
export type AgentManager = any;
|
|
969
|
+
/**
|
|
970
|
+
* Register a display callback.
|
|
971
|
+
* Python parity: praisonaiagents/main.py
|
|
972
|
+
*/
|
|
973
|
+
export declare function register_display_callback(callback: (data: any) => void): void;
|
|
974
|
+
/**
|
|
975
|
+
* Sync display callbacks.
|
|
976
|
+
* Python parity: praisonaiagents/main.py
|
|
977
|
+
*/
|
|
978
|
+
export declare function sync_display_callbacks(): ((data: any) => void)[];
|
|
979
|
+
/**
|
|
980
|
+
* Async display callbacks.
|
|
981
|
+
* Python parity: praisonaiagents/main.py
|
|
982
|
+
*/
|
|
983
|
+
export declare function async_display_callbacks(): ((data: any) => void | Promise<void>)[];
|
|
984
|
+
/**
|
|
985
|
+
* Display error.
|
|
986
|
+
* Python parity: praisonaiagents/main.py
|
|
987
|
+
*/
|
|
988
|
+
export declare function display_error(error: string | Error): void;
|
|
989
|
+
/**
|
|
990
|
+
* Display generating.
|
|
991
|
+
* Python parity: praisonaiagents/main.py
|
|
992
|
+
*/
|
|
993
|
+
export declare function display_generating(agent: string, task?: string): void;
|
|
994
|
+
/**
|
|
995
|
+
* Display instruction.
|
|
996
|
+
* Python parity: praisonaiagents/main.py
|
|
997
|
+
*/
|
|
998
|
+
export declare function display_instruction(instruction: string): void;
|
|
999
|
+
/**
|
|
1000
|
+
* Display interaction.
|
|
1001
|
+
* Python parity: praisonaiagents/main.py
|
|
1002
|
+
*/
|
|
1003
|
+
export declare function display_interaction(from: string, to: string, message: string): void;
|
|
1004
|
+
/**
|
|
1005
|
+
* Display self reflection.
|
|
1006
|
+
* Python parity: praisonaiagents/main.py
|
|
1007
|
+
*/
|
|
1008
|
+
export declare function display_self_reflection(agent: string, reflection: string): void;
|
|
1009
|
+
/**
|
|
1010
|
+
* Display tool call.
|
|
1011
|
+
* Python parity: praisonaiagents/main.py
|
|
1012
|
+
*/
|
|
1013
|
+
export declare function display_tool_call(tool: string, args: any, result?: any): void;
|
|
1014
|
+
/**
|
|
1015
|
+
* Error logs.
|
|
1016
|
+
* Python parity: praisonaiagents/main.py
|
|
1017
|
+
*/
|
|
1018
|
+
export declare function error_logs(): string[];
|
|
1019
|
+
/**
|
|
1020
|
+
* Get plugin manager.
|
|
1021
|
+
* Python parity: praisonaiagents/plugins
|
|
1022
|
+
*/
|
|
1023
|
+
export declare function get_plugin_manager(): {
|
|
1024
|
+
plugins: Map<string, any>;
|
|
1025
|
+
dirs: string[];
|
|
1026
|
+
};
|
|
1027
|
+
/**
|
|
1028
|
+
* Get default plugin dirs.
|
|
1029
|
+
* Python parity: praisonaiagents/plugins
|
|
1030
|
+
*/
|
|
1031
|
+
export declare function get_default_plugin_dirs(): string[];
|
|
1032
|
+
/**
|
|
1033
|
+
* Ensure plugin dir exists.
|
|
1034
|
+
* Python parity: praisonaiagents/plugins
|
|
1035
|
+
*/
|
|
1036
|
+
export declare function ensure_plugin_dir(dir: string): boolean;
|
|
1037
|
+
/**
|
|
1038
|
+
* Get plugin template.
|
|
1039
|
+
* Python parity: praisonaiagents/plugins
|
|
1040
|
+
*/
|
|
1041
|
+
export declare function get_plugin_template(name: string): string;
|
|
1042
|
+
/**
|
|
1043
|
+
* Load plugin.
|
|
1044
|
+
* Python parity: praisonaiagents/plugins
|
|
1045
|
+
*/
|
|
1046
|
+
export declare function load_plugin(path: string): Promise<any>;
|
|
1047
|
+
/**
|
|
1048
|
+
* Parse plugin header.
|
|
1049
|
+
* Python parity: praisonaiagents/plugins
|
|
1050
|
+
*/
|
|
1051
|
+
export declare function parse_plugin_header(content: string): {
|
|
1052
|
+
name?: string;
|
|
1053
|
+
version?: string;
|
|
1054
|
+
description?: string;
|
|
1055
|
+
};
|
|
1056
|
+
/**
|
|
1057
|
+
* Parse plugin header from file.
|
|
1058
|
+
* Python parity: praisonaiagents/plugins
|
|
1059
|
+
*/
|
|
1060
|
+
export declare function parse_plugin_header_from_file(path: string): Promise<{
|
|
1061
|
+
name?: string;
|
|
1062
|
+
version?: string;
|
|
1063
|
+
description?: string;
|
|
1064
|
+
}>;
|
|
1065
|
+
/**
|
|
1066
|
+
* Discover plugins.
|
|
1067
|
+
* Python parity: praisonaiagents/plugins
|
|
1068
|
+
*/
|
|
1069
|
+
export declare function discover_plugins(dirs?: string[]): Promise<string[]>;
|
|
1070
|
+
/**
|
|
1071
|
+
* Discover and load plugins.
|
|
1072
|
+
* Python parity: praisonaiagents/plugins
|
|
1073
|
+
*/
|
|
1074
|
+
export declare function discover_and_load_plugins(dirs?: string[]): Promise<any[]>;
|
|
1075
|
+
/**
|
|
1076
|
+
* Evaluate condition.
|
|
1077
|
+
* Python parity: praisonaiagents/conditions/evaluator.py
|
|
1078
|
+
*/
|
|
1079
|
+
export declare function evaluate_condition(condition: any, context: Record<string, any>): boolean;
|
|
1080
|
+
/**
|
|
1081
|
+
* Get dimensions for embeddings.
|
|
1082
|
+
* Python parity: praisonaiagents/embedding/dimensions.py
|
|
1083
|
+
*/
|
|
1084
|
+
export declare function get_dimensions(model: string): number;
|
|
1085
|
+
/**
|
|
1086
|
+
* Track workflow execution.
|
|
1087
|
+
* Python parity: praisonaiagents/flow_display.py
|
|
1088
|
+
*/
|
|
1089
|
+
export declare function track_workflow(name: string, steps: string[]): {
|
|
1090
|
+
name: string;
|
|
1091
|
+
steps: string[];
|
|
1092
|
+
startTime: number;
|
|
1093
|
+
};
|
|
1094
|
+
/**
|
|
1095
|
+
* Resolve guardrail policies.
|
|
1096
|
+
* Python parity: praisonaiagents/config/resolvers.py
|
|
1097
|
+
*/
|
|
1098
|
+
export declare function resolve_guardrail_policies(policies: (string | any)[]): any[];
|
|
1099
|
+
/**
|
|
1100
|
+
* Trace context manager.
|
|
1101
|
+
* Python parity: praisonaiagents/trace
|
|
1102
|
+
*/
|
|
1103
|
+
export declare function trace_context(name: string): TraceSink;
|
|
1104
|
+
export {};
|