Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MindServer Development #484

Draft
wants to merge 17 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
6bc751d
update gemini model version to 2.0-flash
uukelele-scratch Mar 9, 2025
4a9bcad
Merge branch 'main' of https://github.com/kolbytn/mindcraft
uukelele-scratch Mar 19, 2025
2d1346d
Merge branch 'main' of https://github.com/uukelele-scratch/mindcraft-…
uukelele-scratch Mar 19, 2025
dde02d8
Merge branch 'develop' of https://github.com/kolbytn/mindcraft
uukelele-scratch Mar 19, 2025
8a00fed
add function to update settings dynamically
uukelele-scratch Mar 19, 2025
ee08e64
create a styles.css file as I plan to add more html files to the mind…
uukelele-scratch Mar 19, 2025
b236f20
Added settings frontend, mostly complete, excluding profile and only …
uukelele-scratch Mar 19, 2025
23ad726
rename label for vision permission in settings
uukelele-scratch Mar 19, 2025
8934f59
added lists for profile and only chat with
uukelele-scratch Mar 19, 2025
14d5f0b
added get settings function from mindserver
uukelele-scratch Mar 20, 2025
937d050
refactor get-settings handling to return settings object directly
uukelele-scratch Mar 20, 2025
61c1310
added settings viewing from actual settings data
uukelele-scratch Mar 20, 2025
e029c64
improved button styling
uukelele-scratch Mar 20, 2025
c1e292f
show/hide settings toggle
uukelele-scratch Mar 20, 2025
3763fab
added function to get modified settings + enhanced button styling sli…
uukelele-scratch Mar 20, 2025
2b42f3f
added edit settings feature with save/reset buttons
uukelele-scratch Mar 20, 2025
066848b
added functionality to load and save user-modified settings from a JS…
uukelele-scratch Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
added functionality to load and save user-modified settings from a JS…
…ON file
uukelele-scratch committed Mar 20, 2025
commit 066848b7b86b8bf5cf8312845897fe927ef3860a
47 changes: 47 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"minecraft_version": "1.21.1", // supports up to 1.21.1
"host": "127.0.0.1", // or "localhost", "your.ip.address.here"
"port": 55916,
"auth": "offline", // or "microsoft"

// the mindserver manages all agents and hosts the UI
"host_mindserver": true, // if true, the mindserver will be hosted on this machine. otherwise, specify a public IP address
"mindserver_host": "localhost",
"mindserver_port": 8080,

// the base profile is shared by all bots for default prompts/examples/modes
"base_profile": "./profiles/defaults/survival.json", // also see creative.json, god_mode.json
"profiles": [
"./andy.json",
// "./profiles/gpt.json",
// "./profiles/claude.json",
// "./profiles/gemini.json",
// "./profiles/llama.json",
// "./profiles/qwen.json",
// "./profiles/grok.json",
// "./profiles/mistral.json",
// "./profiles/deepseek.json",

// using more than 1 profile requires you to /msg each bot indivually
// individual profiles override values from the base profile
],
"load_memory": false, // load memory from previous session
"init_message": "Respond with hello world and your name", // sends to all on spawn
"only_chat_with": [], // users that the bots listen to and send general messages to. if empty it will chat publicly
"speak": false, // allows all bots to speak through system text-to-speech. works on windows, mac, on linux you need to `apt install espeak`
"language": "en", // translate to/from this language. Supports these language names: https://cloud.google.com/translate/docs/languages
"show_bot_views": false, // show bot's view in browser at localhost:3000, 3001...

"allow_insecure_coding": false, // allows newAction command and model can write/run code on your computer. enable at own risk
"allow_vision": false, // allows vision model to interpret screenshots as inputs
"blocked_actions" : [], // commands to disable and remove from docs. Ex: ["!setMode"]
"code_timeout_mins": -1, // minutes code is allowed to run. -1 for no timeout
"relevant_docs_count": 5, // number of relevant code function docs to select for prompting. -1 for all

"max_messages": 15, // max number of messages to keep in context
"num_examples": 2, // number of examples to give to the model
"max_commands": -1, // max number of commands that can be used in consecutive responses. -1 for no limit
"verbose_commands": true, // show full command syntax
"narrate_behavior": true, // chat simple automatic actions ('Picking up item!')
"chat_bot_messages": true, // publicly chat messages to other bots
}
18 changes: 17 additions & 1 deletion settings.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import fs from 'fs';
import path from 'path';

const settings = {
"minecraft_version": "1.21.1", // supports up to 1.21.1
"host": "127.0.0.1", // or "localhost", "your.ip.address.here"
@@ -46,9 +49,22 @@ const settings = {
"chat_bot_messages": true, // publicly chat messages to other bots
}

const configPath = path.resolve('./src/server/saved_settings.json'); // This is to save user-modified settings edited via the Mindserver.
if(fs.existsSync(configPath)) {
try {
const newSettings = JSON.parse(fs.readFileSync(configPath, 'utf8'));
Object.assign(settings, newSettings);
} catch (error) {
console.error("Error reading config.json. Using default settings.", error);
}
} else {
fs.writeFileSync(configPath, JSON.stringify(settings, null, 4))
}

// Function to update settings
export function updateSettings(newSettings) {
return Object.assign(settings, newSettings);
Object.assign(settings, newSettings);
fs.writeFileSync(configPath, JSON.stringify(settings, null, 4));
}

// these environment variables override certain settings
1 change: 1 addition & 0 deletions src/server/saved_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}