Skip to content

Commit 7653057

Browse files
committed
release v1.0.0
1 parent 07dba21 commit 7653057

File tree

5 files changed

+105
-11
lines changed

5 files changed

+105
-11
lines changed

.gitignore

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
.env
22
tools/*/*.so
3-
.vscode
3+
main
4+
.vscode/
45
conversation.json
5-
__pycache__
6+
__pycache__
7+
release/
8+
*.tar.gz
9+
super-claude

build.sh

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
3+
# Run validate.py
4+
echo "Running validate.py..."
5+
python3 tools/validate.py
6+
if [ $? -ne 0 ]; then
7+
echo "Validation failed. Exiting."
8+
exit 1
9+
fi
10+
11+
# Run build.sh
12+
echo "Running build.sh..."
13+
./tools/build.sh
14+
if [ $? -ne 0 ]; then
15+
echo "Build failed. Exiting."
16+
exit 1
17+
fi
18+
19+
# Build Go plugins
20+
echo "Building Go plugins..."
21+
for tool_dir in tools/*/; do
22+
if [ -d "$tool_dir" ]; then
23+
tool_name=$(basename "$tool_dir")
24+
go_file="$tool_dir/$tool_name.go"
25+
so_file="$tool_dir/$tool_name.so"
26+
27+
if [ -f "$go_file" ]; then
28+
echo "Building plugin: $tool_name"
29+
go build -buildmode=plugin -o "$so_file" "$go_file"
30+
if [ $? -ne 0 ]; then
31+
echo "Failed to build plugin: $tool_name"
32+
exit 1
33+
fi
34+
fi
35+
fi
36+
done
37+
38+
# Build the main Go project
39+
echo "Building the main Go project..."
40+
go build -o super-claude
41+
if [ $? -ne 0 ]; then
42+
echo "Go build failed. Exiting."
43+
exit 1
44+
fi
45+
46+
# Create a temporary directory for packaging
47+
mkdir -p release
48+
49+
# Copy the main executable to the release directory
50+
cp super-claude release/
51+
52+
# Copy the tools directory to the release directory
53+
cp -R tools release/
54+
55+
# Create the tarball
56+
tar -czf super-claude.tar.gz -C release .
57+
58+
# Remove the temporary release directory
59+
rm -rf release
60+
61+
echo "Tarball created: super-claude.tar.gz"
62+
63+
# Run the main Go project
64+
echo "Running the main Go project..."
65+
./super-claude
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package main
2+
3+
import "github.com/hunterjsb/super-claude/anthropic"
4+
5+
func UPDATE_POSTAL_CODE(params map[string]any) anthropic.Content {
6+
return anthropic.Content{Type: anthropic.ToolResult, Content: "NOT IMPLEMENTED"}
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "update_postal_code",
3+
"description": "Update the information on a single postal code",
4+
"input_schema": {
5+
"type": "object",
6+
"properties": {
7+
"postal_code": {
8+
"type": "string",
9+
"description": "Five-digit US postal code, e.g. 29910"
10+
},
11+
"market_id": {
12+
"type": "integer",
13+
"description": "New market ID to which the postal code will be assigned"
14+
}
15+
}
16+
},
17+
"required": ["postal_code"]
18+
}

tools/validate.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
def validate_tools_folder():
55
tools_dir = "tools"
6-
6+
77
for folder_name in os.listdir(tools_dir):
88
if folder_name.startswith("__"):
99
continue
@@ -18,23 +18,23 @@ def validate_tools_folder():
1818

1919
# Check if JSON file exists and has the correct name
2020
if not os.path.isfile(json_file):
21-
print(f"Error: Missing or incorrectly named JSON file in folder '{folder_name}'")
21+
print(f"\033[91mError: Missing or incorrectly named JSON file in folder '{folder_name}'\033[0m")
2222
continue
2323

2424
# Check if Go file exists and has the correct name
2525
if not os.path.isfile(go_file):
26-
print(f"Error: Missing or incorrectly named Go file in folder '{folder_name}'")
26+
print(f"\033[91mError: Missing or incorrectly named Go file in folder '{folder_name}'\033[0m")
2727
continue
2828

2929
# Check if JSON file has the correct top-level key "name"
3030
try:
3131
with open(json_file, "r") as file:
3232
data = json.load(file)
3333
if "name" not in data or data["name"] != folder_name:
34-
print(f"Error: JSON file in folder '{folder_name}' does not have the correct 'name' key")
34+
print(f"\033[91mError: JSON file in folder '{folder_name}' does not have the correct 'name' key\033[0m")
3535
continue
3636
except json.JSONDecodeError:
37-
print(f"Error: Invalid JSON format in file '{json_file}'")
37+
print(f"\033[91mError: Invalid JSON format in file '{json_file}'\033[0m")
3838
continue
3939

4040
# Check if Go file has the correct function name
@@ -43,15 +43,15 @@ def validate_tools_folder():
4343
content = file.read()
4444
function_name = f"func {folder_name.upper()}("
4545
if function_name not in content:
46-
print(f"Error: Go file in folder '{folder_name}' does not have the correct function name")
46+
print(f"\033[91mError: Go file in folder '{folder_name}' does not have the correct function name\033[0m")
4747
continue
4848
except UnicodeDecodeError:
49-
print(f"Error: Unable to read Go file '{go_file}'")
49+
print(f"\033[91mError: Unable to read Go file '{go_file}'\033[0m")
5050
continue
5151

52-
print(f"Folder '{folder_name}' passed validation")
52+
print(f"\033[92mFolder '{folder_name}' passed validation\033[0m")
5353

54-
print("Validation complete")
54+
print("\033[96mValidation complete 🎉\033[0m")
5555

5656
# Run the validation
5757
validate_tools_folder()

0 commit comments

Comments
 (0)