@xinshu/openagi 0.0.1
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/LICENSE.md +23 -0
- package/README.md +60 -0
- package/cli.js +17 -0
- package/cli.mjs +2 -0
- package/package.json +35 -0
- package/sdk-tools.d.ts +42 -0
- package/sdk.d.ts +33 -0
- package/sdk.mjs +18 -0
- package/vendor/ripgrep/COPYING +3 -0
- package/vendor/ripgrep/arm64-darwin/rg +0 -0
- package/vendor/ripgrep/arm64-darwin/ripgrep.node +0 -0
- package/vendor/ripgrep/arm64-linux/rg +0 -0
- package/vendor/ripgrep/arm64-linux/ripgrep.node +0 -0
- package/vendor/ripgrep/x64-darwin/rg +0 -0
- package/vendor/ripgrep/x64-darwin/ripgrep.node +0 -0
- package/vendor/ripgrep/x64-linux/rg +0 -0
- package/vendor/ripgrep/x64-linux/ripgrep.node +0 -0
- package/vendor/ripgrep/x64-win32/rg.exe +0 -0
- package/vendor/ripgrep/x64-win32/ripgrep.node +0 -0
- package/yoga.wasm +0 -0
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xinshu/openagi",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "cli.js",
|
|
6
|
+
"types": "sdk.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"openagi": "cli.js",
|
|
9
|
+
"openagi-cli": "cli.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"link": "npm unlink -g && npm link && chmod +x cli.js"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18.0.0"
|
|
16
|
+
},
|
|
17
|
+
"description": "OpenAGI - AI-powered coding assistant (@anthropic-ai/claude-code style distribution)",
|
|
18
|
+
"author": "OpenAGI Team",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"keywords": [
|
|
21
|
+
"ai",
|
|
22
|
+
"coding-assistant",
|
|
23
|
+
"cli",
|
|
24
|
+
"anthropic-style",
|
|
25
|
+
"standalone"
|
|
26
|
+
],
|
|
27
|
+
"optionalDependencies": {
|
|
28
|
+
"@img/sharp-darwin-arm64": "^0.34.2",
|
|
29
|
+
"@img/sharp-darwin-x64": "^0.34.2",
|
|
30
|
+
"@img/sharp-linux-arm": "^0.34.2",
|
|
31
|
+
"@img/sharp-linux-arm64": "^0.34.2",
|
|
32
|
+
"@img/sharp-linux-x64": "^0.34.2",
|
|
33
|
+
"@img/sharp-win32-x64": "^0.34.2"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/sdk-tools.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// OpenAGI Tools TypeScript definitions
|
|
2
|
+
// Generated for @anthropic-ai/claude-code style distribution
|
|
3
|
+
|
|
4
|
+
export interface ToolContext {
|
|
5
|
+
workingDirectory: string;
|
|
6
|
+
userId?: string;
|
|
7
|
+
permissions?: string[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ToolResult {
|
|
11
|
+
success: boolean;
|
|
12
|
+
output?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface Tool {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
execute(args: any, context: ToolContext): Promise<ToolResult>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface BashTool extends Tool {
|
|
23
|
+
name: 'Bash';
|
|
24
|
+
execute(args: { command: string }, context: ToolContext): Promise<ToolResult>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface EditTool extends Tool {
|
|
28
|
+
name: 'Edit';
|
|
29
|
+
execute(args: { file_path: string; old_string: string; new_string: string }, context: ToolContext): Promise<ToolResult>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ReadTool extends Tool {
|
|
33
|
+
name: 'Read';
|
|
34
|
+
execute(args: { file_path: string }, context: ToolContext): Promise<ToolResult>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface WriteTool extends Tool {
|
|
38
|
+
name: 'Write';
|
|
39
|
+
execute(args: { file_path: string; content: string }, context: ToolContext): Promise<ToolResult>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export declare const availableTools: Tool[];
|
package/sdk.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// OpenAGI SDK TypeScript definitions
|
|
2
|
+
// Generated for @anthropic-ai/claude-code style distribution
|
|
3
|
+
|
|
4
|
+
declare module 'openagi' {
|
|
5
|
+
export interface OpenAGIConfig {
|
|
6
|
+
apiKey?: string;
|
|
7
|
+
model?: string;
|
|
8
|
+
maxTokens?: number;
|
|
9
|
+
baseURL?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class OpenAGI {
|
|
13
|
+
constructor(config?: OpenAGIConfig);
|
|
14
|
+
chat(message: string, options?: { stream?: boolean }): Promise<string>;
|
|
15
|
+
complete(prompt: string, options?: { model?: string }): Promise<string>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface Tool {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
parameters?: object;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface Session {
|
|
25
|
+
id: string;
|
|
26
|
+
messages: Array<{ role: string; content: string }>;
|
|
27
|
+
model: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default OpenAGI;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export {};
|
package/sdk.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// OpenAGI SDK ES Module
|
|
2
|
+
// Generated for @anthropic-ai/claude-code style distribution
|
|
3
|
+
|
|
4
|
+
export class OpenAGI {
|
|
5
|
+
constructor(config = {}) {
|
|
6
|
+
this.config = config;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
async chat(message, options = {}) {
|
|
10
|
+
throw new Error('SDK not implemented - this is a placeholder for @anthropic-ai/claude-code style distribution');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async complete(prompt, options = {}) {
|
|
14
|
+
throw new Error('SDK not implemented - this is a placeholder for @anthropic-ai/claude-code style distribution');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default OpenAGI;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/yoga.wasm
ADDED
|
Binary file
|