fix: Rename freeflowuniverse to incubaid

This commit is contained in:
Mahmoud-Emad
2025-10-12 12:30:19 +03:00
parent 801c4abb43
commit 8f2d187b17
1593 changed files with 8753 additions and 8300 deletions

View File

@@ -1,6 +1,6 @@
module main
import freeflowuniverse.herolib.ai.mcp.rhai.mcp
import incubaid.herolib.ai.mcp.rhai.mcp
fn main() {
// Create a new MCP server

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
import freeflowuniverse.herolib.ai.mcp.aitools.escalayer
import incubaid.herolib.ai.mcp.aitools.escalayer
import os
fn main() {

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
import freeflowuniverse.herolib.ai.mcp.aitools.escalayer
import incubaid.herolib.ai.mcp.aitools.escalayer
import os
fn main() {

View File

@@ -1,8 +1,8 @@
module logic
import freeflowuniverse.herolib.ai.escalayer
import freeflowuniverse.herolib.lang.rust
import freeflowuniverse.herolib.develop.codetools.utils as ai_utils
import incubaid.herolib.ai.escalayer
import incubaid.herolib.lang.rust
import incubaid.herolib.develop.codetools.utils as ai_utils
import os
pub fn generate_rhai_wrapper(name string, source_path string) !string {
@@ -254,7 +254,8 @@ fn extract_code_blocks(response string) !CodeBlocks {
}
// Extract example.rhai content
mut example_rhai_content := ai_utils.extract_code_block(response, 'example.rhai', 'rhai')
mut example_rhai_content := ai_utils.extract_code_block(response, 'example.rhai',
'rhai')
if example_rhai_content == '' {
// Try to extract from the response without explicit language marker
example_rhai_content = ai_utils.extract_code_block(response, 'example.rhai', '')

View File

@@ -1,8 +1,8 @@
module logic
import freeflowuniverse.herolib.ai.escalayer
import freeflowuniverse.herolib.lang.rust
import freeflowuniverse.herolib.develop.codetools.utils as ai_utils
import incubaid.herolib.ai.escalayer
import incubaid.herolib.lang.rust
import incubaid.herolib.develop.codetools.utils as ai_utils
import os
// pub fn generate_rhai_wrapper_sampling(name string, source_path string) !string {

View File

@@ -1,14 +1,14 @@
module mcp
import freeflowuniverse.herolib.ai.mcp
import freeflowuniverse.herolib.schemas.jsonrpc
import incubaid.herolib.ai.mcp
import incubaid.herolib.schemas.jsonrpc
import log
pub fn new_mcp_server() !&mcp.Server {
pub fn new_mcp_server() !&Server {
log.info('Creating new Developer MCP server')
// Initialize the server with the empty handlers map
mut server := mcp.new_server(mcp.MemoryBackend{
mut server := mcp.new_server(MemoryBackend{
tools: {
'generate_rhai_wrapper': generate_rhai_wrapper_spec
}
@@ -21,9 +21,9 @@ pub fn new_mcp_server() !&mcp.Server {
prompt_handlers: {
'rhai_wrapper': rhai_wrapper_prompt_handler
}
}, mcp.ServerParams{
config: mcp.ServerConfiguration{
server_info: mcp.ServerInfo{
}, ServerParams{
config: ServerConfiguration{
server_info: ServerInfo{
name: 'rhai'
version: '1.0.0'
}

View File

@@ -1,18 +1,18 @@
module mcp
import freeflowuniverse.herolib.ai.mcp
import freeflowuniverse.herolib.develop.codetools as code
import freeflowuniverse.herolib.ai.mcp.rhai.logic
import freeflowuniverse.herolib.schemas.jsonschema
import freeflowuniverse.herolib.lang.rust
import incubaid.herolib.ai.mcp
import incubaid.herolib.develop.codetools as code
import incubaid.herolib.ai.mcp.rhai.logic
import incubaid.herolib.schemas.jsonschema
import incubaid.herolib.lang.rust
import x.json2 as json
// Tool definition for the create_rhai_wrapper function
const rhai_wrapper_prompt_spec = mcp.Prompt{
const rhai_wrapper_prompt_spec = Prompt{
name: 'rhai_wrapper'
description: 'provides a prompt for creating Rhai wrappers for Rust functions that follow builder pattern and create examples corresponding to the provided example file'
arguments: [
mcp.PromptArgument{
PromptArgument{
name: 'source_path'
description: 'Path to the source directory'
required: true
@@ -21,7 +21,7 @@ const rhai_wrapper_prompt_spec = mcp.Prompt{
}
// Tool handler for the create_rhai_wrapper function
pub fn rhai_wrapper_prompt_handler(arguments []string) ![]mcp.PromptMessage {
pub fn rhai_wrapper_prompt_handler(arguments []string) ![]PromptMessage {
source_path := arguments[0]
// Read and combine all Rust files in the source directory
@@ -34,9 +34,9 @@ pub fn rhai_wrapper_prompt_handler(arguments []string) ![]mcp.PromptMessage {
result := logic.rhai_wrapper_generation_prompt(name, source_code, source_pkg_info)!
return [
mcp.PromptMessage{
PromptMessage{
role: 'assistant'
content: mcp.PromptContent{
content: PromptContent{
typ: 'text'
text: result
}

View File

@@ -1,11 +1,11 @@
module mcp
import freeflowuniverse.herolib.ai.mcp
import incubaid.herolib.ai.mcp
import x.json2 as json
import freeflowuniverse.herolib.schemas.jsonschema
import incubaid.herolib.schemas.jsonschema
import log
const specs = mcp.Tool{
const specs = Tool{
name: 'rhai_interface'
description: 'Add Rhai Interface to Rust Code Files'
input_schema: jsonschema.Schema{

View File

@@ -1,13 +1,13 @@
module mcp
import freeflowuniverse.herolib.ai.mcp
import freeflowuniverse.herolib.develop.codetools as code
import freeflowuniverse.herolib.ai.mcp.rhai.logic
import freeflowuniverse.herolib.schemas.jsonschema
import incubaid.herolib.ai.mcp
import incubaid.herolib.develop.codetools as code
import incubaid.herolib.ai.mcp.rhai.logic
import incubaid.herolib.schemas.jsonschema
import x.json2 as json { Any }
// Tool definition for the generate_rhai_wrapper function
const generate_rhai_wrapper_spec = mcp.Tool{
const generate_rhai_wrapper_spec = Tool{
name: 'generate_rhai_wrapper'
description: 'generate_rhai_wrapper receives the name of a V language function string, and the path to the module in which it exists.'
input_schema: jsonschema.Schema{
@@ -25,13 +25,13 @@ const generate_rhai_wrapper_spec = mcp.Tool{
}
// Tool handler for the generate_rhai_wrapper function
pub fn generate_rhai_wrapper_handler(arguments map[string]Any) !mcp.ToolCallResult {
pub fn generate_rhai_wrapper_handler(arguments map[string]Any) !ToolCallResult {
name := arguments['name'].str()
source_path := arguments['source_path'].str()
result := logic.generate_rhai_wrapper(name, source_path) or {
return mcp.error_tool_call_result(err)
}
return mcp.ToolCallResult{
return ToolCallResult{
is_error: false
content: mcp.result_to_mcp_tool_contents[string](result)
}