Skip to content

Commit

Permalink
feat: restructure directories
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
  • Loading branch information
akihikokuroda committed Oct 29, 2024
1 parent cf85dc2 commit 0635d92
Show file tree
Hide file tree
Showing 22 changed files with 17 additions and 31 deletions.
13 changes: 0 additions & 13 deletions examples/tsconfig.json

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@
"clean": "rimraf dist",
"build": "yarn clean && yarn ts:check && tsup",
"ts:check": "tsc --noEmit && tsc -p tsconfig.examples.json --noEmit",
"start": "tsx --tsconfig tsconfig.examples.json examples/agents/manyToolsAgent.ts",
"start": "tsx",
"lint": "yarn eslint",
"lint:fix": "yarn eslint --fix",
"format": "yarn prettier --check .",
"format:fix": "yarn prettier --write .",
"test:unit": "vitest run src",
"test:unit": "vitest run --exclude=\"tools/airtable/tests\" --exclude=\"tools/imageDescriptions/tests\"",
"test:unit:watch": "vitest run src",
"test:e2e": "vitest run tests",
"test:e2e:watch": "vitest watch tests",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { describe, test } from "vitest";
import { AirtableTool, AirtableToolOptions } from "@/tools/airtable.js";
import { AirtableTool, AirtableToolOptions } from "@tools/airtable/airtable.js";

import { setupServer } from "msw/node";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import "dotenv/config.js";
import { BAMChatLLM } from "bee-agent-framework/adapters/bam/chat";
import { BeeAgent } from "bee-agent-framework/agents/bee/agent";
import { createConsoleReader } from "../helpers/io.js";
import { createConsoleReader } from "@tools/examples/helpers/io.js";
import { FrameworkError } from "bee-agent-framework/errors";
import { TokenMemory } from "bee-agent-framework/memory/tokenMemory";
import { Logger } from "bee-agent-framework/logger/logger";
Expand All @@ -39,7 +39,7 @@ import { DuckDuckGoSearchTool } from "bee-agent-framework/tools/search/duckDuckG
import { WikipediaTool } from "bee-agent-framework/tools/search/wikipedia";

// AirTable tool
import { AirtableTool } from "bee-community-tools/tools/airtable";
import { AirtableTool } from "@tools/airtable/airtable.js";

const AIRTABLE_TOKEN: string = parseEnv("AIRTABLE_TOKEN", z.string());
const AIRTABLE_BASE: string = parseEnv("AIRTABLE_BASE", z.string());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { AirtableTool } from "@/tools/airtable.js";
import { AirtableTool } from "@tools/airtable/airtable.js";
import { beforeEach, expect } from "vitest";

const AIRTABLE_TOKEN: string = process.env.AIRTABLE_TOKEN as string;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { ImageDescriptionTool } from "@/tools/imageDescription.js";
import { ImageDescriptionTool } from "./imageDescription.js";

import { afterAll, afterEach, beforeAll, expect, describe, test, vi } from "vitest";
import { setupServer } from "msw/node";
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { ImageDescriptionTool } from "@/tools/imageDescription.js";
import { ImageDescriptionTool } from "@tools/imageDescriptions/imageDescription.js";

import { beforeEach, expect } from "vitest";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import "dotenv/config.js";
import { BAMChatLLM } from "bee-agent-framework/adapters/bam/chat";
import { BeeAgent } from "bee-agent-framework/agents/bee/agent";
import { createConsoleReader } from "../helpers/io.js";
import { createConsoleReader } from "@helpers/io.js";
import { FrameworkError } from "bee-agent-framework/errors";
import { TokenMemory } from "bee-agent-framework/memory/tokenMemory";
import { Logger } from "bee-agent-framework/logger/logger";
Expand All @@ -36,13 +36,10 @@ import {
// core tools
import { DuckDuckGoSearchTool } from "bee-agent-framework/tools/search/duckDuckGoSearch";
import { WikipediaTool } from "bee-agent-framework/tools/search/wikipedia";
// import { OpenMeteoTool } from "bee-agent-framework/tools/weather/openMeteo";
// import { ArXivTool } from "bee-agent-framework/tools/arxiv";

// contrib tools
// import { HelloWorldTool } from "@/tools/helloWorld.js";
import { OpenLibraryTool } from "bee-community-tools/tools/openLibrary";
import { ImageDescriptionTool } from "bee-community-tools/tools/imageDescription";
import { OpenLibraryTool } from "@tools/openLibrary/openLibrary.js";
import { ImageDescriptionTool } from "@tools/imageDescriptions/imageDescription.js";

Logger.root.level = "silent"; // disable internal logs
const logger = new Logger({ name: "app", level: "trace" });
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { OpenLibraryTool } from "@/tools/openLibrary.js";
import { OpenLibraryTool } from "@tools/openLibrary/openLibrary.js";

import { beforeEach, expect } from "vitest";

Expand Down
2 changes: 1 addition & 1 deletion src/version.test.ts → tools/version.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { Version } from "@/version.js";
import { Version } from "./version.js";

describe("Version", () => {
it("has a valid version", () => {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.examples.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "./examples/tsconfig.json"
"extends": "./tools/tsconfig.json"
}
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"skipLibCheck": true,
"paths": {
"@/*": ["./src/*"],
"@tests/*": ["./tests/*"]
"@tests/*": ["./tests/*"],
"@tools/*": ["./tools/*"],
"@helpers/*": ["./tools/examples/helpers/*"]
},
"useUnknownInCatchVariables": false
},
Expand Down

0 comments on commit 0635d92

Please sign in to comment.