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.
@@ -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 declare function agent(config: AgentConfig): {
29
- stream(options: { messages: Array<{ role: string; content: string }> }): {
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
@@ -1709,7 +1709,7 @@ var BYTES_PER_MB = 1024 * 1024;
1709
1709
  // deno.json
1710
1710
  var deno_default = {
1711
1711
  name: "veryfront",
1712
- version: "0.0.29",
1712
+ version: "0.0.30",
1713
1713
  nodeModulesDir: "auto",
1714
1714
  exports: {
1715
1715
  ".": "./src/index.ts",