Skip to content

Commit

Permalink
refactor: rename tools with demo_ prefix
Browse files Browse the repository at this point in the history
Co-Authored-By: Nicolas Arqueros <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and nicarq committed Dec 16, 2024
1 parent 6dde7e1 commit 84221d6
Show file tree
Hide file tree
Showing 30 changed files with 1,975 additions and 0 deletions.
32 changes: 32 additions & 0 deletions apps/demo_shinkai-tool-echo/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@shinkai_protocol/shinkai-tool-echo",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/shinkai-tool-echo/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/shinkai-tool-echo/src/index.ts --outputFolder ./dist/apps/shinkai-tool-echo"
},
"configurations": {
"development": {},
"production": {}
}
},
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/shinkai-tool-echo/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/shinkai-tool-echo/src/**/*.test.ts"
}
}
}
}
7 changes: 7 additions & 0 deletions apps/demo_shinkai-tool-echo/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { run } from './index.ts';
import { assertEquals } from 'jsr:@std/assert';

Deno.test('echo', async () => {
const result = await run({}, { message: 'hi' });
assertEquals(result.message, 'echoing: hi');
});
36 changes: 36 additions & 0 deletions apps/demo_shinkai-tool-echo/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
export const run: Run<{}, { message: string }, { message: string }> = (
_configurations,
parameters,
): Promise<{ message: string }> => {
console.log('run echo from js');
return Promise.resolve({
message: `echoing: ${parameters.message}`,
});
};

export const definition: ToolDefinition<typeof run> = {
id: 'shinkai-tool-echo',
name: 'Shinkai: Echo',
description: 'Echoes the input message',
author: 'Shinkai',
keywords: ['echo', 'shinkai'],
configurations: {
type: 'object',
properties: {},
required: [],
},
parameters: {
type: 'object',
properties: {
message: { type: 'string' },
},
required: ['message'],
},
result: {
type: 'object',
properties: {
message: { type: 'string' },
},
required: ['message'],
},
};
32 changes: 32 additions & 0 deletions apps/demo_shinkai-tool-ethplorer-tokens/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@shinkai_protocol/shinkai-tool-ethplorer-tokens",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/shinkai-tool-ethplorer-tokens/src",
"projectType": "library",
"tags": ["tool"],
"targets": {
"build": {
"executor": "nx:run-commands",
"defaultConfiguration": "production",
"options": {
"command": "deno task tool-bundler --entry ./apps/shinkai-tool-ethplorer-tokens/src/index.ts --outputFolder ./dist/apps/shinkai-tool-ethplorer-tokens"
},
"configurations": {
"development": {},
"production": {}
}
},
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "deno lint apps/shinkai-tool-ethplorer-tokens/src/index.ts"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "deno test --no-check --allow-all apps/shinkai-tool-ethplorer-tokens/src/**/*.test.ts"
}
}
}
}
Loading

0 comments on commit 84221d6

Please sign in to comment.