sdkwork-browser-agent 1.0.0
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/README.md +228 -0
- package/README.zh.md +228 -0
- package/dist/agent-Bpxmkz8W.d.ts +197 -0
- package/dist/agent-kexkkI13.d.cts +197 -0
- package/dist/browser/agent-Bpxmkz8W.d.ts +197 -0
- package/dist/browser/chunk-7W2JJCSS.js +276 -0
- package/dist/browser/chunk-7W2JJCSS.js.map +1 -0
- package/dist/browser/chunk-BHRFRGR7.js +144 -0
- package/dist/browser/chunk-BHRFRGR7.js.map +1 -0
- package/dist/browser/chunk-CLP6UNSV.js +285 -0
- package/dist/browser/chunk-CLP6UNSV.js.map +1 -0
- package/dist/browser/chunk-HXLRBB7S.js +1569 -0
- package/dist/browser/chunk-HXLRBB7S.js.map +1 -0
- package/dist/browser/chunk-VJEFLRZT.js +1720 -0
- package/dist/browser/chunk-VJEFLRZT.js.map +1 -0
- package/dist/browser/index.d.ts +842 -0
- package/dist/browser/index.js +3293 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/llm/index.d.ts +235 -0
- package/dist/browser/llm/index.js +29 -0
- package/dist/browser/llm/index.js.map +1 -0
- package/dist/browser/mcp/index.d.ts +63 -0
- package/dist/browser/mcp/index.js +9 -0
- package/dist/browser/mcp/index.js.map +1 -0
- package/dist/browser/provider-Dna36xA-.d.ts +105 -0
- package/dist/browser/skills/index.d.ts +401 -0
- package/dist/browser/skills/index.js +31 -0
- package/dist/browser/skills/index.js.map +1 -0
- package/dist/browser/storage/index.d.ts +64 -0
- package/dist/browser/storage/index.js +15 -0
- package/dist/browser/storage/index.js.map +1 -0
- package/dist/browser/tools/index.d.ts +45 -0
- package/dist/browser/tools/index.js +15 -0
- package/dist/browser/tools/index.js.map +1 -0
- package/dist/browser/types-CG5I-byI.d.ts +30 -0
- package/dist/chunk-56J3IBXZ.js +144 -0
- package/dist/chunk-56J3IBXZ.js.map +1 -0
- package/dist/chunk-5XTVS5MB.js +1720 -0
- package/dist/chunk-5XTVS5MB.js.map +1 -0
- package/dist/chunk-6AYIRBGI.js +166 -0
- package/dist/chunk-6AYIRBGI.js.map +1 -0
- package/dist/chunk-C2EYJHXW.cjs +276 -0
- package/dist/chunk-C2EYJHXW.cjs.map +1 -0
- package/dist/chunk-HOZQ445W.cjs +166 -0
- package/dist/chunk-HOZQ445W.cjs.map +1 -0
- package/dist/chunk-KZNZ6CGD.cjs +144 -0
- package/dist/chunk-KZNZ6CGD.cjs.map +1 -0
- package/dist/chunk-XFMT5ZA4.js +276 -0
- package/dist/chunk-XFMT5ZA4.js.map +1 -0
- package/dist/chunk-XPGICLEJ.cjs +1720 -0
- package/dist/chunk-XPGICLEJ.cjs.map +1 -0
- package/dist/index.cjs +1311 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +395 -0
- package/dist/index.d.ts +395 -0
- package/dist/index.js +1311 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/index.cjs +29 -0
- package/dist/llm/index.cjs.map +1 -0
- package/dist/llm/index.d.cts +235 -0
- package/dist/llm/index.d.ts +235 -0
- package/dist/llm/index.js +29 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/mcp/index.cjs +9 -0
- package/dist/mcp/index.cjs.map +1 -0
- package/dist/mcp/index.d.cts +63 -0
- package/dist/mcp/index.d.ts +63 -0
- package/dist/mcp/index.js +9 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/node/agent-Bpxmkz8W.d.ts +197 -0
- package/dist/node/agent-kexkkI13.d.cts +197 -0
- package/dist/node/chunk-7W2JJCSS.js +276 -0
- package/dist/node/chunk-7W2JJCSS.js.map +1 -0
- package/dist/node/chunk-BHRFRGR7.js +144 -0
- package/dist/node/chunk-BHRFRGR7.js.map +1 -0
- package/dist/node/chunk-CLP6UNSV.js +285 -0
- package/dist/node/chunk-CLP6UNSV.js.map +1 -0
- package/dist/node/chunk-HXLRBB7S.js +1569 -0
- package/dist/node/chunk-HXLRBB7S.js.map +1 -0
- package/dist/node/chunk-IYG37UN3.cjs +144 -0
- package/dist/node/chunk-IYG37UN3.cjs.map +1 -0
- package/dist/node/chunk-JF33ZOMB.cjs +285 -0
- package/dist/node/chunk-JF33ZOMB.cjs.map +1 -0
- package/dist/node/chunk-KXXS33G3.cjs +276 -0
- package/dist/node/chunk-KXXS33G3.cjs.map +1 -0
- package/dist/node/chunk-MTFOABGC.cjs +1720 -0
- package/dist/node/chunk-MTFOABGC.cjs.map +1 -0
- package/dist/node/chunk-VJEFLRZT.js +1720 -0
- package/dist/node/chunk-VJEFLRZT.js.map +1 -0
- package/dist/node/chunk-YDHQCPSN.cjs +1569 -0
- package/dist/node/chunk-YDHQCPSN.cjs.map +1 -0
- package/dist/node/index.cjs +3293 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +842 -0
- package/dist/node/index.d.ts +842 -0
- package/dist/node/index.js +3293 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/llm/index.cjs +29 -0
- package/dist/node/llm/index.cjs.map +1 -0
- package/dist/node/llm/index.d.cts +235 -0
- package/dist/node/llm/index.d.ts +235 -0
- package/dist/node/llm/index.js +29 -0
- package/dist/node/llm/index.js.map +1 -0
- package/dist/node/mcp/index.cjs +9 -0
- package/dist/node/mcp/index.cjs.map +1 -0
- package/dist/node/mcp/index.d.cts +63 -0
- package/dist/node/mcp/index.d.ts +63 -0
- package/dist/node/mcp/index.js +9 -0
- package/dist/node/mcp/index.js.map +1 -0
- package/dist/node/provider-Dna36xA-.d.cts +105 -0
- package/dist/node/provider-Dna36xA-.d.ts +105 -0
- package/dist/node/skills/index.cjs +31 -0
- package/dist/node/skills/index.cjs.map +1 -0
- package/dist/node/skills/index.d.cts +401 -0
- package/dist/node/skills/index.d.ts +401 -0
- package/dist/node/skills/index.js +31 -0
- package/dist/node/skills/index.js.map +1 -0
- package/dist/node/storage/index.cjs +15 -0
- package/dist/node/storage/index.cjs.map +1 -0
- package/dist/node/storage/index.d.cts +64 -0
- package/dist/node/storage/index.d.ts +64 -0
- package/dist/node/storage/index.js +15 -0
- package/dist/node/storage/index.js.map +1 -0
- package/dist/node/tools/index.cjs +15 -0
- package/dist/node/tools/index.cjs.map +1 -0
- package/dist/node/tools/index.d.cts +45 -0
- package/dist/node/tools/index.d.ts +45 -0
- package/dist/node/tools/index.js +15 -0
- package/dist/node/tools/index.js.map +1 -0
- package/dist/node/types-CG5I-byI.d.cts +30 -0
- package/dist/node/types-CG5I-byI.d.ts +30 -0
- package/dist/provider-Dna36xA-.d.cts +105 -0
- package/dist/provider-Dna36xA-.d.ts +105 -0
- package/dist/skills/index.cjs +15 -0
- package/dist/skills/index.cjs.map +1 -0
- package/dist/skills/index.d.cts +43 -0
- package/dist/skills/index.d.ts +43 -0
- package/dist/skills/index.js +15 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/tools/index.cjs +15 -0
- package/dist/tools/index.cjs.map +1 -0
- package/dist/tools/index.d.cts +45 -0
- package/dist/tools/index.d.ts +45 -0
- package/dist/tools/index.js +15 -0
- package/dist/tools/index.js.map +1 -0
- package/package.json +150 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { T as Tool, E as ExecutionContext, q as ToolOutput } from '../agent-Bpxmkz8W.js';
|
|
2
|
+
import '../provider-Dna36xA-.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Tool Registry for managing and discovering tools
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface ToolRegistryConfig {
|
|
9
|
+
autoDiscover?: boolean;
|
|
10
|
+
toolDirectory?: string;
|
|
11
|
+
}
|
|
12
|
+
declare class ToolRegistry {
|
|
13
|
+
private tools;
|
|
14
|
+
private categories;
|
|
15
|
+
constructor(_config?: ToolRegistryConfig);
|
|
16
|
+
register(tool: Tool): void;
|
|
17
|
+
unregister(name: string): boolean;
|
|
18
|
+
get(name: string): Tool | undefined;
|
|
19
|
+
has(name: string): boolean;
|
|
20
|
+
list(): Tool[];
|
|
21
|
+
listNames(): string[];
|
|
22
|
+
findByCategory(category: string): Tool[];
|
|
23
|
+
findByTag(tag: string): Tool[];
|
|
24
|
+
findByConfirmation(needsConfirmation: boolean): Tool[];
|
|
25
|
+
search(query: string): Tool[];
|
|
26
|
+
execute(name: string, input: unknown, context: ExecutionContext): Promise<ToolOutput>;
|
|
27
|
+
clear(): void;
|
|
28
|
+
getCategories(): string[];
|
|
29
|
+
getStats(): {
|
|
30
|
+
total: number;
|
|
31
|
+
categories: number;
|
|
32
|
+
requireConfirmation: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Built-in Tools
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
declare const fileReadTool: Tool;
|
|
41
|
+
declare const fileWriteTool: Tool;
|
|
42
|
+
declare const httpRequestTool: Tool;
|
|
43
|
+
declare const builtInTools: Tool[];
|
|
44
|
+
|
|
45
|
+
export { ToolRegistry, type ToolRegistryConfig, builtInTools, fileReadTool, fileWriteTool, httpRequestTool };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ToolRegistry,
|
|
3
|
+
builtInTools,
|
|
4
|
+
fileReadTool,
|
|
5
|
+
fileWriteTool,
|
|
6
|
+
httpRequestTool
|
|
7
|
+
} from "../chunk-7W2JJCSS.js";
|
|
8
|
+
export {
|
|
9
|
+
ToolRegistry,
|
|
10
|
+
builtInTools,
|
|
11
|
+
fileReadTool,
|
|
12
|
+
fileWriteTool,
|
|
13
|
+
httpRequestTool
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Adapter Types
|
|
3
|
+
* Unified storage interface for browser and Node.js environments
|
|
4
|
+
*/
|
|
5
|
+
interface StorageAdapter {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly isAvailable: boolean;
|
|
8
|
+
readFile(path: string): Promise<string | null>;
|
|
9
|
+
writeFile(path: string, content: string): Promise<void>;
|
|
10
|
+
deleteFile(path: string): Promise<void>;
|
|
11
|
+
exists(path: string): Promise<boolean>;
|
|
12
|
+
listDirectory(path: string): Promise<string[]>;
|
|
13
|
+
createDirectory(path: string): Promise<void>;
|
|
14
|
+
deleteDirectory(path: string): Promise<void>;
|
|
15
|
+
getMetadata(path: string): Promise<FileMetadata | null>;
|
|
16
|
+
}
|
|
17
|
+
interface FileMetadata {
|
|
18
|
+
path: string;
|
|
19
|
+
size: number;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
modifiedAt: Date;
|
|
22
|
+
isDirectory: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface StorageConfig {
|
|
25
|
+
basePath?: string;
|
|
26
|
+
prefix?: string;
|
|
27
|
+
}
|
|
28
|
+
type StorageAdapterFactory = (config?: StorageConfig) => StorageAdapter;
|
|
29
|
+
|
|
30
|
+
export type { FileMetadata as F, StorageAdapter as S, StorageConfig as a, StorageAdapterFactory as b };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Adapter Types
|
|
3
|
+
* Unified storage interface for browser and Node.js environments
|
|
4
|
+
*/
|
|
5
|
+
interface StorageAdapter {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly isAvailable: boolean;
|
|
8
|
+
readFile(path: string): Promise<string | null>;
|
|
9
|
+
writeFile(path: string, content: string): Promise<void>;
|
|
10
|
+
deleteFile(path: string): Promise<void>;
|
|
11
|
+
exists(path: string): Promise<boolean>;
|
|
12
|
+
listDirectory(path: string): Promise<string[]>;
|
|
13
|
+
createDirectory(path: string): Promise<void>;
|
|
14
|
+
deleteDirectory(path: string): Promise<void>;
|
|
15
|
+
getMetadata(path: string): Promise<FileMetadata | null>;
|
|
16
|
+
}
|
|
17
|
+
interface FileMetadata {
|
|
18
|
+
path: string;
|
|
19
|
+
size: number;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
modifiedAt: Date;
|
|
22
|
+
isDirectory: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface StorageConfig {
|
|
25
|
+
basePath?: string;
|
|
26
|
+
prefix?: string;
|
|
27
|
+
}
|
|
28
|
+
type StorageAdapterFactory = (config?: StorageConfig) => StorageAdapter;
|
|
29
|
+
|
|
30
|
+
export type { FileMetadata as F, StorageAdapter as S, StorageConfig as a, StorageAdapterFactory as b };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Provider Interface
|
|
3
|
+
* Supports various LLM providers: OpenAI, Anthropic, Google, local models, etc.
|
|
4
|
+
*/
|
|
5
|
+
interface LLMMessage {
|
|
6
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
7
|
+
content: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
tool_calls?: ToolCall[];
|
|
10
|
+
tool_call_id?: string;
|
|
11
|
+
}
|
|
12
|
+
interface ToolCall {
|
|
13
|
+
id: string;
|
|
14
|
+
type: 'function';
|
|
15
|
+
function: {
|
|
16
|
+
name: string;
|
|
17
|
+
arguments: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
interface LLMRequest {
|
|
21
|
+
messages: LLMMessage[];
|
|
22
|
+
model?: string;
|
|
23
|
+
temperature?: number;
|
|
24
|
+
max_tokens?: number;
|
|
25
|
+
top_p?: number;
|
|
26
|
+
stream?: boolean;
|
|
27
|
+
tools?: ToolDefinition[];
|
|
28
|
+
tool_choice?: 'auto' | 'none' | {
|
|
29
|
+
type: 'function';
|
|
30
|
+
function: {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
interface ToolDefinition {
|
|
36
|
+
type: 'function';
|
|
37
|
+
function: {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
parameters: Record<string, unknown>;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
interface LLMResponse {
|
|
44
|
+
id: string;
|
|
45
|
+
model: string;
|
|
46
|
+
content: string;
|
|
47
|
+
role: 'assistant';
|
|
48
|
+
tool_calls?: ToolCall[];
|
|
49
|
+
usage?: {
|
|
50
|
+
prompt_tokens: number;
|
|
51
|
+
completion_tokens: number;
|
|
52
|
+
total_tokens: number;
|
|
53
|
+
};
|
|
54
|
+
finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter';
|
|
55
|
+
}
|
|
56
|
+
interface LLMStreamChunk {
|
|
57
|
+
id: string;
|
|
58
|
+
model: string;
|
|
59
|
+
delta: {
|
|
60
|
+
content?: string;
|
|
61
|
+
role?: 'assistant';
|
|
62
|
+
tool_calls?: ToolCall[];
|
|
63
|
+
};
|
|
64
|
+
finish_reason?: 'stop' | 'length' | 'tool_calls' | 'content_filter';
|
|
65
|
+
}
|
|
66
|
+
interface LLMProviderConfig {
|
|
67
|
+
apiKey?: string;
|
|
68
|
+
baseUrl?: string;
|
|
69
|
+
model?: string;
|
|
70
|
+
defaultParams?: Partial<LLMRequest>;
|
|
71
|
+
timeout?: number;
|
|
72
|
+
retries?: number;
|
|
73
|
+
}
|
|
74
|
+
interface LLMProvider {
|
|
75
|
+
readonly name: string;
|
|
76
|
+
readonly supportedModels: string[];
|
|
77
|
+
complete(request: LLMRequest): Promise<LLMResponse>;
|
|
78
|
+
stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
|
|
79
|
+
validateConfig(): boolean;
|
|
80
|
+
}
|
|
81
|
+
type LLMProviderFactory = (config: LLMProviderConfig) => LLMProvider;
|
|
82
|
+
declare class LLMProviderRegistry {
|
|
83
|
+
private providers;
|
|
84
|
+
private instances;
|
|
85
|
+
register(name: string, factory: LLMProviderFactory): void;
|
|
86
|
+
create(name: string, config: LLMProviderConfig): LLMProvider;
|
|
87
|
+
get(name: string): LLMProvider | undefined;
|
|
88
|
+
listProviders(): string[];
|
|
89
|
+
isRegistered(name: string): boolean;
|
|
90
|
+
}
|
|
91
|
+
declare const globalProviderRegistry: LLMProviderRegistry;
|
|
92
|
+
declare class LLMManager {
|
|
93
|
+
private registry;
|
|
94
|
+
private providers;
|
|
95
|
+
private defaultProvider?;
|
|
96
|
+
constructor(registry?: LLMProviderRegistry);
|
|
97
|
+
addProvider(name: string, config: LLMProviderConfig): LLMProvider;
|
|
98
|
+
setDefaultProvider(name: string): void;
|
|
99
|
+
getProvider(name?: string): LLMProvider;
|
|
100
|
+
complete(request: LLMRequest, providerName?: string): Promise<LLMResponse>;
|
|
101
|
+
stream(request: LLMRequest, providerName?: string): AsyncIterableIterator<LLMStreamChunk>;
|
|
102
|
+
listProviders(): string[];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { type LLMProvider as L, type ToolDefinition as T, type LLMMessage as a, type LLMRequest as b, type LLMResponse as c, type LLMStreamChunk as d, LLMManager as e, type LLMProviderConfig as f, type LLMProviderFactory as g, LLMProviderRegistry as h, type ToolCall as i, globalProviderRegistry as j };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Provider Interface
|
|
3
|
+
* Supports various LLM providers: OpenAI, Anthropic, Google, local models, etc.
|
|
4
|
+
*/
|
|
5
|
+
interface LLMMessage {
|
|
6
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
7
|
+
content: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
tool_calls?: ToolCall[];
|
|
10
|
+
tool_call_id?: string;
|
|
11
|
+
}
|
|
12
|
+
interface ToolCall {
|
|
13
|
+
id: string;
|
|
14
|
+
type: 'function';
|
|
15
|
+
function: {
|
|
16
|
+
name: string;
|
|
17
|
+
arguments: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
interface LLMRequest {
|
|
21
|
+
messages: LLMMessage[];
|
|
22
|
+
model?: string;
|
|
23
|
+
temperature?: number;
|
|
24
|
+
max_tokens?: number;
|
|
25
|
+
top_p?: number;
|
|
26
|
+
stream?: boolean;
|
|
27
|
+
tools?: ToolDefinition[];
|
|
28
|
+
tool_choice?: 'auto' | 'none' | {
|
|
29
|
+
type: 'function';
|
|
30
|
+
function: {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
interface ToolDefinition {
|
|
36
|
+
type: 'function';
|
|
37
|
+
function: {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
parameters: Record<string, unknown>;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
interface LLMResponse {
|
|
44
|
+
id: string;
|
|
45
|
+
model: string;
|
|
46
|
+
content: string;
|
|
47
|
+
role: 'assistant';
|
|
48
|
+
tool_calls?: ToolCall[];
|
|
49
|
+
usage?: {
|
|
50
|
+
prompt_tokens: number;
|
|
51
|
+
completion_tokens: number;
|
|
52
|
+
total_tokens: number;
|
|
53
|
+
};
|
|
54
|
+
finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter';
|
|
55
|
+
}
|
|
56
|
+
interface LLMStreamChunk {
|
|
57
|
+
id: string;
|
|
58
|
+
model: string;
|
|
59
|
+
delta: {
|
|
60
|
+
content?: string;
|
|
61
|
+
role?: 'assistant';
|
|
62
|
+
tool_calls?: ToolCall[];
|
|
63
|
+
};
|
|
64
|
+
finish_reason?: 'stop' | 'length' | 'tool_calls' | 'content_filter';
|
|
65
|
+
}
|
|
66
|
+
interface LLMProviderConfig {
|
|
67
|
+
apiKey?: string;
|
|
68
|
+
baseUrl?: string;
|
|
69
|
+
model?: string;
|
|
70
|
+
defaultParams?: Partial<LLMRequest>;
|
|
71
|
+
timeout?: number;
|
|
72
|
+
retries?: number;
|
|
73
|
+
}
|
|
74
|
+
interface LLMProvider {
|
|
75
|
+
readonly name: string;
|
|
76
|
+
readonly supportedModels: string[];
|
|
77
|
+
complete(request: LLMRequest): Promise<LLMResponse>;
|
|
78
|
+
stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
|
|
79
|
+
validateConfig(): boolean;
|
|
80
|
+
}
|
|
81
|
+
type LLMProviderFactory = (config: LLMProviderConfig) => LLMProvider;
|
|
82
|
+
declare class LLMProviderRegistry {
|
|
83
|
+
private providers;
|
|
84
|
+
private instances;
|
|
85
|
+
register(name: string, factory: LLMProviderFactory): void;
|
|
86
|
+
create(name: string, config: LLMProviderConfig): LLMProvider;
|
|
87
|
+
get(name: string): LLMProvider | undefined;
|
|
88
|
+
listProviders(): string[];
|
|
89
|
+
isRegistered(name: string): boolean;
|
|
90
|
+
}
|
|
91
|
+
declare const globalProviderRegistry: LLMProviderRegistry;
|
|
92
|
+
declare class LLMManager {
|
|
93
|
+
private registry;
|
|
94
|
+
private providers;
|
|
95
|
+
private defaultProvider?;
|
|
96
|
+
constructor(registry?: LLMProviderRegistry);
|
|
97
|
+
addProvider(name: string, config: LLMProviderConfig): LLMProvider;
|
|
98
|
+
setDefaultProvider(name: string): void;
|
|
99
|
+
getProvider(name?: string): LLMProvider;
|
|
100
|
+
complete(request: LLMRequest, providerName?: string): Promise<LLMResponse>;
|
|
101
|
+
stream(request: LLMRequest, providerName?: string): AsyncIterableIterator<LLMStreamChunk>;
|
|
102
|
+
listProviders(): string[];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { type LLMProvider as L, type ToolDefinition as T, type LLMMessage as a, type LLMRequest as b, type LLMResponse as c, type LLMStreamChunk as d, LLMManager as e, type LLMProviderConfig as f, type LLMProviderFactory as g, LLMProviderRegistry as h, type ToolCall as i, globalProviderRegistry as j };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkHOZQ445Wcjs = require('../chunk-HOZQ445W.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.SkillRegistry = _chunkHOZQ445Wcjs.SkillRegistry; exports.builtInSkills = _chunkHOZQ445Wcjs.builtInSkills; exports.echoSkill = _chunkHOZQ445Wcjs.echoSkill; exports.listSkillsSkill = _chunkHOZQ445Wcjs.listSkillsSkill; exports.mathSkill = _chunkHOZQ445Wcjs.mathSkill;
|
|
15
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["d:\\sdkwork-opensource\\sdkwork-browser-agent\\dist\\skills\\index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACF,gRAAC","file":"D:\\sdkwork-opensource\\sdkwork-browser-agent\\dist\\skills\\index.cjs"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { S as Skill, E as ExecutionContext, a as SkillResult } from '../agent-kexkkI13.cjs';
|
|
2
|
+
import '../provider-Dna36xA-.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Skill Registry for managing and discovering skills
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface SkillRegistryConfig {
|
|
9
|
+
autoDiscover?: boolean;
|
|
10
|
+
skillDirectory?: string;
|
|
11
|
+
}
|
|
12
|
+
declare class SkillRegistry {
|
|
13
|
+
private skills;
|
|
14
|
+
private categories;
|
|
15
|
+
constructor(_config?: SkillRegistryConfig);
|
|
16
|
+
register(skill: Skill): void;
|
|
17
|
+
unregister(name: string): boolean;
|
|
18
|
+
get(name: string): Skill | undefined;
|
|
19
|
+
has(name: string): boolean;
|
|
20
|
+
list(): Skill[];
|
|
21
|
+
listNames(): string[];
|
|
22
|
+
findByCategory(category: string): Skill[];
|
|
23
|
+
findByTag(tag: string): Skill[];
|
|
24
|
+
search(query: string): Skill[];
|
|
25
|
+
execute(name: string, params: Record<string, unknown>, context: ExecutionContext): Promise<SkillResult>;
|
|
26
|
+
clear(): void;
|
|
27
|
+
getCategories(): string[];
|
|
28
|
+
getStats(): {
|
|
29
|
+
total: number;
|
|
30
|
+
categories: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Built-in Skills
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
declare const echoSkill: Skill;
|
|
39
|
+
declare const mathSkill: Skill;
|
|
40
|
+
declare const listSkillsSkill: Skill;
|
|
41
|
+
declare const builtInSkills: Skill[];
|
|
42
|
+
|
|
43
|
+
export { SkillRegistry, type SkillRegistryConfig, builtInSkills, echoSkill, listSkillsSkill, mathSkill };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { S as Skill, E as ExecutionContext, a as SkillResult } from '../agent-Bpxmkz8W.js';
|
|
2
|
+
import '../provider-Dna36xA-.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Skill Registry for managing and discovering skills
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface SkillRegistryConfig {
|
|
9
|
+
autoDiscover?: boolean;
|
|
10
|
+
skillDirectory?: string;
|
|
11
|
+
}
|
|
12
|
+
declare class SkillRegistry {
|
|
13
|
+
private skills;
|
|
14
|
+
private categories;
|
|
15
|
+
constructor(_config?: SkillRegistryConfig);
|
|
16
|
+
register(skill: Skill): void;
|
|
17
|
+
unregister(name: string): boolean;
|
|
18
|
+
get(name: string): Skill | undefined;
|
|
19
|
+
has(name: string): boolean;
|
|
20
|
+
list(): Skill[];
|
|
21
|
+
listNames(): string[];
|
|
22
|
+
findByCategory(category: string): Skill[];
|
|
23
|
+
findByTag(tag: string): Skill[];
|
|
24
|
+
search(query: string): Skill[];
|
|
25
|
+
execute(name: string, params: Record<string, unknown>, context: ExecutionContext): Promise<SkillResult>;
|
|
26
|
+
clear(): void;
|
|
27
|
+
getCategories(): string[];
|
|
28
|
+
getStats(): {
|
|
29
|
+
total: number;
|
|
30
|
+
categories: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Built-in Skills
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
declare const echoSkill: Skill;
|
|
39
|
+
declare const mathSkill: Skill;
|
|
40
|
+
declare const listSkillsSkill: Skill;
|
|
41
|
+
declare const builtInSkills: Skill[];
|
|
42
|
+
|
|
43
|
+
export { SkillRegistry, type SkillRegistryConfig, builtInSkills, echoSkill, listSkillsSkill, mathSkill };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SkillRegistry,
|
|
3
|
+
builtInSkills,
|
|
4
|
+
echoSkill,
|
|
5
|
+
listSkillsSkill,
|
|
6
|
+
mathSkill
|
|
7
|
+
} from "../chunk-6AYIRBGI.js";
|
|
8
|
+
export {
|
|
9
|
+
SkillRegistry,
|
|
10
|
+
builtInSkills,
|
|
11
|
+
echoSkill,
|
|
12
|
+
listSkillsSkill,
|
|
13
|
+
mathSkill
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkC2EYJHXWcjs = require('../chunk-C2EYJHXW.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.ToolRegistry = _chunkC2EYJHXWcjs.ToolRegistry; exports.builtInTools = _chunkC2EYJHXWcjs.builtInTools; exports.fileReadTool = _chunkC2EYJHXWcjs.fileReadTool; exports.fileWriteTool = _chunkC2EYJHXWcjs.fileWriteTool; exports.httpRequestTool = _chunkC2EYJHXWcjs.httpRequestTool;
|
|
15
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["d:\\sdkwork-opensource\\sdkwork-browser-agent\\dist\\tools\\index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACF,0RAAC","file":"D:\\sdkwork-opensource\\sdkwork-browser-agent\\dist\\tools\\index.cjs"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { T as Tool, E as ExecutionContext, q as ToolOutput } from '../agent-kexkkI13.cjs';
|
|
2
|
+
import '../provider-Dna36xA-.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Tool Registry for managing and discovering tools
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface ToolRegistryConfig {
|
|
9
|
+
autoDiscover?: boolean;
|
|
10
|
+
toolDirectory?: string;
|
|
11
|
+
}
|
|
12
|
+
declare class ToolRegistry {
|
|
13
|
+
private tools;
|
|
14
|
+
private categories;
|
|
15
|
+
constructor(_config?: ToolRegistryConfig);
|
|
16
|
+
register(tool: Tool): void;
|
|
17
|
+
unregister(name: string): boolean;
|
|
18
|
+
get(name: string): Tool | undefined;
|
|
19
|
+
has(name: string): boolean;
|
|
20
|
+
list(): Tool[];
|
|
21
|
+
listNames(): string[];
|
|
22
|
+
findByCategory(category: string): Tool[];
|
|
23
|
+
findByTag(tag: string): Tool[];
|
|
24
|
+
findByConfirmation(needsConfirmation: boolean): Tool[];
|
|
25
|
+
search(query: string): Tool[];
|
|
26
|
+
execute(name: string, input: unknown, context: ExecutionContext): Promise<ToolOutput>;
|
|
27
|
+
clear(): void;
|
|
28
|
+
getCategories(): string[];
|
|
29
|
+
getStats(): {
|
|
30
|
+
total: number;
|
|
31
|
+
categories: number;
|
|
32
|
+
requireConfirmation: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Built-in Tools
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
declare const fileReadTool: Tool;
|
|
41
|
+
declare const fileWriteTool: Tool;
|
|
42
|
+
declare const httpRequestTool: Tool;
|
|
43
|
+
declare const builtInTools: Tool[];
|
|
44
|
+
|
|
45
|
+
export { ToolRegistry, type ToolRegistryConfig, builtInTools, fileReadTool, fileWriteTool, httpRequestTool };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { T as Tool, E as ExecutionContext, q as ToolOutput } from '../agent-Bpxmkz8W.js';
|
|
2
|
+
import '../provider-Dna36xA-.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Tool Registry for managing and discovering tools
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface ToolRegistryConfig {
|
|
9
|
+
autoDiscover?: boolean;
|
|
10
|
+
toolDirectory?: string;
|
|
11
|
+
}
|
|
12
|
+
declare class ToolRegistry {
|
|
13
|
+
private tools;
|
|
14
|
+
private categories;
|
|
15
|
+
constructor(_config?: ToolRegistryConfig);
|
|
16
|
+
register(tool: Tool): void;
|
|
17
|
+
unregister(name: string): boolean;
|
|
18
|
+
get(name: string): Tool | undefined;
|
|
19
|
+
has(name: string): boolean;
|
|
20
|
+
list(): Tool[];
|
|
21
|
+
listNames(): string[];
|
|
22
|
+
findByCategory(category: string): Tool[];
|
|
23
|
+
findByTag(tag: string): Tool[];
|
|
24
|
+
findByConfirmation(needsConfirmation: boolean): Tool[];
|
|
25
|
+
search(query: string): Tool[];
|
|
26
|
+
execute(name: string, input: unknown, context: ExecutionContext): Promise<ToolOutput>;
|
|
27
|
+
clear(): void;
|
|
28
|
+
getCategories(): string[];
|
|
29
|
+
getStats(): {
|
|
30
|
+
total: number;
|
|
31
|
+
categories: number;
|
|
32
|
+
requireConfirmation: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Built-in Tools
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
declare const fileReadTool: Tool;
|
|
41
|
+
declare const fileWriteTool: Tool;
|
|
42
|
+
declare const httpRequestTool: Tool;
|
|
43
|
+
declare const builtInTools: Tool[];
|
|
44
|
+
|
|
45
|
+
export { ToolRegistry, type ToolRegistryConfig, builtInTools, fileReadTool, fileWriteTool, httpRequestTool };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ToolRegistry,
|
|
3
|
+
builtInTools,
|
|
4
|
+
fileReadTool,
|
|
5
|
+
fileWriteTool,
|
|
6
|
+
httpRequestTool
|
|
7
|
+
} from "../chunk-XFMT5ZA4.js";
|
|
8
|
+
export {
|
|
9
|
+
ToolRegistry,
|
|
10
|
+
builtInTools,
|
|
11
|
+
fileReadTool,
|
|
12
|
+
fileWriteTool,
|
|
13
|
+
httpRequestTool
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|