Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feature/2048-game
Browse files Browse the repository at this point in the history
  • Loading branch information
guillevalin committed Jan 30, 2025
2 parents a660404 + e01c208 commit 5007609
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 35 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build_tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ on:
workflow_dispatch:
inputs:
node_version:
description: 'Shinkai Node version to use (e.g. 0.9.7)'
description: 'Shinkai Node version to use (e.g. 0.9.8)'
required: true
type: string
default: "0.9.7"
default: "0.9.8"
use_dev_prefix:
description: 'Use dev prefix for download URL (e.g. https://download.shinkai.com/dev-tools-0.9.7)'
description: 'Use dev prefix for download URL (e.g. https://download.shinkai.com/dev-tools-0.9.7). If false, it will build for production (e.g. https://download.shinkai.com/tools-0.9.7)'
required: true
type: boolean
default: true
have_run_tests:
description: 'Have you run tests successfully?'
required: true
type: boolean
default: false

jobs:
build_tools:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ on:
workflow_dispatch:
inputs:
node_version:
description: 'Shinkai Node version to use (e.g. 0.9.7)'
description: 'Shinkai Node version to use (e.g. 0.9.8)'
required: true
type: string
default: "0.9.7"
default: "0.9.8"

jobs:
run_tests:
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
SHINKAI_STORE_ADDR: "https://shinkai-store-302883622007.us-central1.run.app"
SHINKAI_STORE_TOKEN: ${{ secrets.SHINKAI_STORE_TOKEN }}
USE_DOCKER: true
SHINKAI_NODE_IMAGE: "dcsparkdevops/shinkai-node:${{ inputs.node_version || 'latest' }}"
SHINKAI_NODE_IMAGE: "dcsparkdevops/shinkai-node:${{ inputs.node_version || 'debug-latest' }}"
run: |
./scripts/run_node.sh &
timeout 60 bash -c 'until curl -s --location "$SHINKAI_NODE_ADDR/v2/health_check" | jq -e ".status == \"ok\"" > /dev/null; do sleep 1; done'
Expand Down
105 changes: 89 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,101 @@ A collection of official tools for Shinkai, providing various functionalities fr

## Overview

This repository hosts a suite of tools designed to work with Shinkai's infrastructure
This repository hosts a suite of tools designed to work with Shinkai's infrastructure. Each tool is built to provide specific functionality while maintaining security and reliability through Shinkai's sandboxed environment.

## Available Tools

Currently available tools include:

### 1. Email IMAP Fetcher
- Fetches emails from an IMAP server
- Returns subject, date, sender, and text content
- Secure email handling
### Search & Information
- **Smart Search**: Comprehensive answer generation with source citations and statement extraction
- **DuckDuckGo Search**: Web search functionality with structured results
- **Google Search**: Web search using Google's search engine
- **X/Twitter Search**: Search tweets and user information
- **YouTube Summary**: Generate summaries of YouTube video content
- **Perplexity**: AI-powered search and analysis
- **Perplexity API**: Direct integration with Perplexity's API

### 2. Email Sender
- Sends emails using SMTP
- Simple and reliable email dispatch
### Email & Communication
- **Email IMAP Fetcher**: Secure email retrieval from IMAP servers
- **Email Sender**: SMTP-based email dispatch service
- **Email Responder**: Automated email response generation with context awareness
- **Twitter Post**: Post updates to X/Twitter platform

### 3. Smart Search
- Performs intelligent query optimization
- Returns comprehensive answers with sources
- Advanced search capabilities
### File & Data Management
- **File Read**: Secure file reading operations
- **File Write**: File creation and update capabilities
- **File Update**: Modify existing file contents
- **Memory**: SQLite-based memory storage and retrieval
- **Download Page**: Web page content retrieval

And more!
### Blockchain & Crypto
- **Coinbase Call Faucet**: Interact with Coinbase faucet
- **Coinbase Create Wallet**: Wallet creation functionality
- **Coinbase Get Balance**: Check wallet balances
- **Coinbase Get My Address**: Retrieve wallet addresses
- **Coinbase Get Transactions**: View transaction history
- **Coinbase Send TX**: Execute transactions

### Media & Content
- **Meme Generator**: Create custom meme images
- **Text-to-Audio Kokoro**: Convert text to audio using Kokoro

## Tool Structure and Required Files

Every Shinkai tool requires specific files to function properly. Here's a detailed look at each required file:

### icon.png
- Square image in PNG format (1:1 ratio)
- Minimum dimensions: 80x80 pixels
- Used for tool identification in the Shinkai UI and Store
- Example: A distinctive icon representing the tool's primary function

### banner.png
- Wide image in PNG format (16:9 ratio)
- Minimum dimensions: 1200x676 pixels
- Used for tool identification in the Shinkai UI and Store
- Example: A real world usage scenario that explains the tool benefits.

### metadata.json
- Defines tool configuration and interface
- Contains version, name, description, and author
- Specifies input parameters and output format
- Example:
```json
{
"version": "1.0.0",
"name": "Example Tool",
"description": "Brief description of the tool's purpose",
"parameters": {
"type": "object",
"properties": {
"input": {
"type": "string",
"description": "Description of the input"
}
}
}
}
```

### tool.ts or tool.py
- Main implementation file (TypeScript or Python)
- Contains the core logic and functionality
- Exports a default function that processes inputs
- Example:
```typescript
export default async function(input: string): Promise<string> {
// Tool implementation
return processedResult;
}
```

### README.md
- Documentation for tool usage and setup
- Installation and configuration instructions
- Examples of input/output formats
- Any additional requirements or dependencies

## Project Structure
```
Expand All @@ -33,9 +107,8 @@ tools/
│ ├── metadata.json # Tool metadata.
│ ├── README.md # A description of the tool.
│ └── tool.ts # The code of the tool.
├── packages/
│ ├── tool.zip # Zipped contents of the tool.
│ └── directory.json # A listing of the available tools.
│ └── icon.png # Icon of the tool.
│ └── banner.png # Banner of the tool.
```

## Run Tests
Expand Down
1 change: 1 addition & 0 deletions scripts/build_tools/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export interface Metadata {
name: string;
query: string;
}[];
oauth: Record<string, string>[] | null;
}

export interface DirectoryEntry {
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_tools/save_tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function buildToolJson(
activated: false,
assets: null,
file_inbox: null,
oauth: null,
oauth: metadata.oauth,
output_arg: { json: "" },
author,
config: metadata.configurations?.properties ?
Expand Down
2 changes: 1 addition & 1 deletion tools/email-responder/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@
"local:::__official_shinkai:::shinkai_llm_prompt_processor",
"local:::__official_shinkai:::memory_management"
],
"oauth": []
"oauth": null
}
2 changes: 1 addition & 1 deletion tools/file-read/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
"sqlTables": [],
"sqlQueries": [],
"tools": [],
"oauth": []
"oauth": null
}
2 changes: 1 addition & 1 deletion tools/file-update/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@
"tools": [
"local:::__official_shinkai:::shinkai_llm_prompt_processor"
],
"oauth": []
"oauth": null
}
2 changes: 1 addition & 1 deletion tools/file-write/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@
"sqlTables": [],
"sqlQueries": [],
"tools": [],
"oauth": []
"oauth": null
}
2 changes: 1 addition & 1 deletion tools/meme-generator/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@
"local:::__official_shinkai:::shinkai_llm_prompt_processor",
"local:::__official_shinkai:::smart_search_engine"
],
"oauth": []
"oauth": null
}
2 changes: 1 addition & 1 deletion tools/memory/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@
"local:::__official_shinkai:::shinkai_sqlite_query_executor",
"local:::__official_shinkai:::shinkai_llm_prompt_processor"
],
"oauth": []
"oauth": null
}
6 changes: 3 additions & 3 deletions tools/text-to-audio-kokoro/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
},
"parameters": {
"properties": {
"input_file": {
"description": "Path to the input text file (.txt or .md)",
"text": {
"description": "text to convert to audio",
"type": "string"
},
"voice": {
Expand Down Expand Up @@ -58,7 +58,7 @@
}
},
"required": [
"input_file"
"text"
],
"type": "object"
},
Expand Down
Loading

0 comments on commit 5007609

Please sign in to comment.