veryfront 0.0.29 → 0.0.30
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/ai/index.d.ts +77 -4
- package/dist/ai/index.js +1 -1
- package/dist/ai/index.js.map +1 -1
- package/dist/cli.js +6 -7
- package/dist/components.js +1 -1
- package/dist/components.js.map +1 -1
- package/dist/data.js +1 -1
- package/dist/data.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
// AI module type definitions
|
|
2
2
|
import type { z } from 'zod';
|
|
3
3
|
|
|
4
|
+
// ============================================================================
|
|
5
|
+
// Core Types
|
|
6
|
+
// ============================================================================
|
|
7
|
+
|
|
4
8
|
export interface AgentConfig {
|
|
9
|
+
id?: string;
|
|
5
10
|
model: string;
|
|
6
|
-
system?: string;
|
|
11
|
+
system?: string | (() => string | Promise<string>);
|
|
7
12
|
tools?: Record<string, boolean | object>;
|
|
8
13
|
memory?: {
|
|
9
14
|
type?: 'conversation' | 'summary' | 'buffer';
|
|
@@ -25,16 +30,84 @@ export interface ResourceConfig<TParams = unknown, TData = unknown> {
|
|
|
25
30
|
load: (params: TParams) => Promise<TData> | TData;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
|
-
export
|
|
29
|
-
|
|
33
|
+
export interface PromptConfig {
|
|
34
|
+
name: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
getContent: (args?: Record<string, unknown>) => string | Promise<string>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// Agent Functions
|
|
41
|
+
// ============================================================================
|
|
42
|
+
|
|
43
|
+
export interface AgentInstance {
|
|
44
|
+
id: string;
|
|
45
|
+
config: AgentConfig;
|
|
46
|
+
stream(options: { messages?: Array<{ role: string; content: string }>; input?: string }): Promise<{
|
|
30
47
|
toDataStreamResponse(): Response;
|
|
31
|
-
}
|
|
48
|
+
}>;
|
|
32
49
|
respond(request: Request): Promise<Response>;
|
|
50
|
+
generate(options: { input: string | Array<{ role: string; content: string }> }): Promise<{
|
|
51
|
+
text: string;
|
|
52
|
+
messages: Array<{ role: string; content: string }>;
|
|
53
|
+
}>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export declare function agent(config: AgentConfig): AgentInstance;
|
|
57
|
+
|
|
58
|
+
export declare const agentRegistry: {
|
|
59
|
+
get(id: string): AgentInstance | undefined;
|
|
60
|
+
getAll(): Map<string, AgentInstance>;
|
|
61
|
+
register(id: string, agent: AgentInstance): void;
|
|
33
62
|
};
|
|
34
63
|
|
|
64
|
+
// ============================================================================
|
|
65
|
+
// Tool Functions
|
|
66
|
+
// ============================================================================
|
|
67
|
+
|
|
35
68
|
export declare function tool<TInput, TOutput>(config: ToolConfig<TInput, TOutput>): ToolConfig<TInput, TOutput>;
|
|
36
69
|
|
|
70
|
+
export declare const toolRegistry: {
|
|
71
|
+
get(id: string): ToolConfig | undefined;
|
|
72
|
+
getAll(): Map<string, ToolConfig>;
|
|
73
|
+
register(id: string, tool: ToolConfig): void;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// ============================================================================
|
|
77
|
+
// Resource Functions
|
|
78
|
+
// ============================================================================
|
|
79
|
+
|
|
37
80
|
export declare function resource<TParams, TData>(config: ResourceConfig<TParams, TData>): ResourceConfig<TParams, TData>;
|
|
38
81
|
|
|
82
|
+
export declare const resourceRegistry: {
|
|
83
|
+
get(uri: string): ResourceConfig | undefined;
|
|
84
|
+
getAll(): Map<string, ResourceConfig>;
|
|
85
|
+
register(uri: string, resource: ResourceConfig): void;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// ============================================================================
|
|
89
|
+
// Prompt Functions
|
|
90
|
+
// ============================================================================
|
|
91
|
+
|
|
92
|
+
export declare function prompt(config: PromptConfig): PromptConfig;
|
|
93
|
+
|
|
94
|
+
export declare const promptRegistry: {
|
|
95
|
+
get(name: string): PromptConfig | undefined;
|
|
96
|
+
getAll(): Map<string, PromptConfig>;
|
|
97
|
+
register(name: string, prompt: PromptConfig): void;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// ============================================================================
|
|
101
|
+
// Discovery Functions
|
|
102
|
+
// ============================================================================
|
|
103
|
+
|
|
104
|
+
export declare function discoverAll(options?: { baseDir?: string; verbose?: boolean }): Promise<void>;
|
|
105
|
+
|
|
106
|
+
// ============================================================================
|
|
107
|
+
// Provider Functions
|
|
108
|
+
// ============================================================================
|
|
109
|
+
|
|
110
|
+
export declare function initializeProviders(config: { openai?: { apiKey?: string }; anthropic?: { apiKey?: string } }): void;
|
|
111
|
+
|
|
39
112
|
// Re-export from ai-sdk
|
|
40
113
|
export * from 'ai';
|
package/dist/ai/index.js
CHANGED