@ragable/sdk 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.
@@ -0,0 +1,32 @@
1
+ interface AgentConfig {
2
+ name: string;
3
+ model?: string;
4
+ memory?: boolean;
5
+ tools?: any[];
6
+ knowledge?: string[];
7
+ }
8
+ declare class Agent {
9
+ private config;
10
+ constructor(config: AgentConfig);
11
+ deploy(): Promise<{
12
+ status: string;
13
+ agentId: string;
14
+ url: string;
15
+ }>;
16
+ run(input: string): Promise<{
17
+ response: string;
18
+ traceId: string;
19
+ }>;
20
+ }
21
+ declare class Tool {
22
+ static connect(apiKey: string): {
23
+ type: string;
24
+ connected: boolean;
25
+ };
26
+ }
27
+ declare const _default: {
28
+ Agent: typeof Agent;
29
+ Tool: typeof Tool;
30
+ };
31
+
32
+ export { Agent, type AgentConfig, Tool, _default as default };
@@ -0,0 +1,32 @@
1
+ interface AgentConfig {
2
+ name: string;
3
+ model?: string;
4
+ memory?: boolean;
5
+ tools?: any[];
6
+ knowledge?: string[];
7
+ }
8
+ declare class Agent {
9
+ private config;
10
+ constructor(config: AgentConfig);
11
+ deploy(): Promise<{
12
+ status: string;
13
+ agentId: string;
14
+ url: string;
15
+ }>;
16
+ run(input: string): Promise<{
17
+ response: string;
18
+ traceId: string;
19
+ }>;
20
+ }
21
+ declare class Tool {
22
+ static connect(apiKey: string): {
23
+ type: string;
24
+ connected: boolean;
25
+ };
26
+ }
27
+ declare const _default: {
28
+ Agent: typeof Agent;
29
+ Tool: typeof Tool;
30
+ };
31
+
32
+ export { Agent, type AgentConfig, Tool, _default as default };
package/dist/index.js ADDED
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
21
+
22
+ // src/index.ts
23
+ var index_exports = {};
24
+ __export(index_exports, {
25
+ Agent: () => Agent,
26
+ Tool: () => Tool,
27
+ default: () => index_default
28
+ });
29
+ module.exports = __toCommonJS(index_exports);
30
+ var Agent = class {
31
+ constructor(config) {
32
+ __publicField(this, "config");
33
+ this.config = config;
34
+ }
35
+ async deploy() {
36
+ console.log(`Deploying agent: ${this.config.name}...`);
37
+ return {
38
+ status: "deployed",
39
+ agentId: "ag_" + Math.random().toString(36).substr(2, 9),
40
+ url: `https://api.ragable.com/v1/agents/${this.config.name}`
41
+ };
42
+ }
43
+ async run(input) {
44
+ console.log(`Agent ${this.config.name} processing: ${input}`);
45
+ return {
46
+ response: "This is a mock response from the SDK.",
47
+ traceId: "tr_" + Math.random().toString(36).substr(2, 9)
48
+ };
49
+ }
50
+ };
51
+ var Tool = class {
52
+ static connect(apiKey) {
53
+ void apiKey;
54
+ return { type: "tool", connected: true };
55
+ }
56
+ };
57
+ var index_default = {
58
+ Agent,
59
+ Tool
60
+ };
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ Agent,
64
+ Tool
65
+ });
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export interface AgentConfig {\n name: string;\n model?: string;\n memory?: boolean;\n tools?: any[];\n knowledge?: string[];\n}\n\nexport class Agent {\n private config: AgentConfig;\n\n constructor(config: AgentConfig) {\n this.config = config;\n }\n\n public async deploy() {\n console.log(`Deploying agent: ${this.config.name}...`);\n return {\n status: \"deployed\",\n agentId: \"ag_\" + Math.random().toString(36).substr(2, 9),\n url: `https://api.ragable.com/v1/agents/${this.config.name}`,\n };\n }\n\n public async run(input: string) {\n console.log(`Agent ${this.config.name} processing: ${input}`);\n return {\n response: \"This is a mock response from the SDK.\",\n traceId: \"tr_\" + Math.random().toString(36).substr(2, 9),\n };\n }\n}\n\nexport class Tool {\n static connect(apiKey: string) {\n void apiKey;\n return { type: \"tool\", connected: true };\n }\n}\n\nexport default {\n Agent,\n Tool,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,IAAM,QAAN,MAAY;AAAA,EAGjB,YAAY,QAAqB;AAFjC,wBAAQ;AAGN,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,MAAa,SAAS;AACpB,YAAQ,IAAI,oBAAoB,KAAK,OAAO,IAAI,KAAK;AACrD,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,QAAQ,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,OAAO,GAAG,CAAC;AAAA,MACvD,KAAK,qCAAqC,KAAK,OAAO,IAAI;AAAA,IAC5D;AAAA,EACF;AAAA,EAEA,MAAa,IAAI,OAAe;AAC9B,YAAQ,IAAI,SAAS,KAAK,OAAO,IAAI,gBAAgB,KAAK,EAAE;AAC5D,WAAO;AAAA,MACL,UAAU;AAAA,MACV,SAAS,QAAQ,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,OAAO,GAAG,CAAC;AAAA,IACzD;AAAA,EACF;AACF;AAEO,IAAM,OAAN,MAAW;AAAA,EAChB,OAAO,QAAQ,QAAgB;AAC7B,SAAK;AACL,WAAO,EAAE,MAAM,QAAQ,WAAW,KAAK;AAAA,EACzC;AACF;AAEA,IAAO,gBAAQ;AAAA,EACb;AAAA,EACA;AACF;","names":[]}
package/dist/index.mjs ADDED
@@ -0,0 +1,42 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+
5
+ // src/index.ts
6
+ var Agent = class {
7
+ constructor(config) {
8
+ __publicField(this, "config");
9
+ this.config = config;
10
+ }
11
+ async deploy() {
12
+ console.log(`Deploying agent: ${this.config.name}...`);
13
+ return {
14
+ status: "deployed",
15
+ agentId: "ag_" + Math.random().toString(36).substr(2, 9),
16
+ url: `https://api.ragable.com/v1/agents/${this.config.name}`
17
+ };
18
+ }
19
+ async run(input) {
20
+ console.log(`Agent ${this.config.name} processing: ${input}`);
21
+ return {
22
+ response: "This is a mock response from the SDK.",
23
+ traceId: "tr_" + Math.random().toString(36).substr(2, 9)
24
+ };
25
+ }
26
+ };
27
+ var Tool = class {
28
+ static connect(apiKey) {
29
+ void apiKey;
30
+ return { type: "tool", connected: true };
31
+ }
32
+ };
33
+ var index_default = {
34
+ Agent,
35
+ Tool
36
+ };
37
+ export {
38
+ Agent,
39
+ Tool,
40
+ index_default as default
41
+ };
42
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export interface AgentConfig {\n name: string;\n model?: string;\n memory?: boolean;\n tools?: any[];\n knowledge?: string[];\n}\n\nexport class Agent {\n private config: AgentConfig;\n\n constructor(config: AgentConfig) {\n this.config = config;\n }\n\n public async deploy() {\n console.log(`Deploying agent: ${this.config.name}...`);\n return {\n status: \"deployed\",\n agentId: \"ag_\" + Math.random().toString(36).substr(2, 9),\n url: `https://api.ragable.com/v1/agents/${this.config.name}`,\n };\n }\n\n public async run(input: string) {\n console.log(`Agent ${this.config.name} processing: ${input}`);\n return {\n response: \"This is a mock response from the SDK.\",\n traceId: \"tr_\" + Math.random().toString(36).substr(2, 9),\n };\n }\n}\n\nexport class Tool {\n static connect(apiKey: string) {\n void apiKey;\n return { type: \"tool\", connected: true };\n }\n}\n\nexport default {\n Agent,\n Tool,\n};\n"],"mappings":";;;;;AAQO,IAAM,QAAN,MAAY;AAAA,EAGjB,YAAY,QAAqB;AAFjC,wBAAQ;AAGN,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,MAAa,SAAS;AACpB,YAAQ,IAAI,oBAAoB,KAAK,OAAO,IAAI,KAAK;AACrD,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,QAAQ,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,OAAO,GAAG,CAAC;AAAA,MACvD,KAAK,qCAAqC,KAAK,OAAO,IAAI;AAAA,IAC5D;AAAA,EACF;AAAA,EAEA,MAAa,IAAI,OAAe;AAC9B,YAAQ,IAAI,SAAS,KAAK,OAAO,IAAI,gBAAgB,KAAK,EAAE;AAC5D,WAAO;AAAA,MACL,UAAU;AAAA,MACV,SAAS,QAAQ,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,OAAO,GAAG,CAAC;AAAA,IACzD;AAAA,EACF;AACF;AAEO,IAAM,OAAN,MAAW;AAAA,EAChB,OAAO,QAAQ,QAAgB;AAC7B,SAAK;AACL,WAAO,EAAE,MAAM,QAAQ,WAAW,KAAK;AAAA,EACzC;AACF;AAEA,IAAO,gBAAQ;AAAA,EACb;AAAA,EACA;AACF;","names":[]}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@ragable/sdk",
3
+ "version": "0.0.1",
4
+ "description": "The official SDK for Ragable - The Operating System for AI Agents",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "require": "./dist/index.js",
12
+ "import": "./dist/index.mjs"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsup",
20
+ "dev": "tsup --watch",
21
+ "lint": "tsc",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "keywords": [
25
+ "ai",
26
+ "agent",
27
+ "rag",
28
+ "llm",
29
+ "sdk"
30
+ ],
31
+ "author": "Ragable",
32
+ "license": "MIT",
33
+ "devDependencies": {
34
+ "tsup": "^8.0.1",
35
+ "typescript": "^5.3.3"
36
+ },
37
+ "publishConfig": {
38
+ "access": "public"
39
+ }
40
+ }